@Throws(SQLException::class) fun dropUser(user: User, ignore: Boolean) { val sql = String.format("drop user %s", user.getLogin()) try { execute(sql) } catch (e: SQLException) { if (!ignore) { throw e } else if (logger.isDebugEnabled()) { logger.debug("Drop user failed: $sql", e) } } }
Drops user , ignoring errors if desired by caller .