working on translation of system messages
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -7,6 +7,8 @@ import static de.srsoftware.tools.jdbc.Query.insertInto;
|
||||
import static de.srsoftware.tools.jdbc.Query.select;
|
||||
import static de.srsoftware.umbrella.contact.Constants.*;
|
||||
import static de.srsoftware.umbrella.core.Constants.*;
|
||||
import static de.srsoftware.umbrella.core.Errors.FAILED_TO_LOAD_CONTACTS_OF_USER;
|
||||
import static de.srsoftware.umbrella.core.Errors.FAILED_TO_LOAD_CONTACT_BY_ID;
|
||||
import static de.srsoftware.umbrella.core.exceptions.UmbrellaException.databaseException;
|
||||
import static de.srsoftware.umbrella.core.exceptions.UmbrellaException.notFound;
|
||||
import static java.text.MessageFormat.format;
|
||||
@@ -94,9 +96,9 @@ public class SqliteDb extends BaseDb implements ContactDb{
|
||||
if (rs.next()) contact = Contact.of(rs);
|
||||
rs.close();
|
||||
if (contact != null) return contact;
|
||||
throw notFound("Failed to load contact with id = {0}", contactId);
|
||||
throw notFound(FAILED_TO_LOAD_CONTACT_BY_ID, contactId);
|
||||
} catch (SQLException e) {
|
||||
throw databaseException("Failed to load contacts of user {0}",userId);
|
||||
throw databaseException(FAILED_TO_LOAD_CONTACTS_OF_USER,userId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user