logging the error

This commit is contained in:
swakrish 2016-01-21 13:22:45 -08:00
parent f8a992cbc7
commit 869b48f428

View file

@ -167,7 +167,7 @@ public class Notebook {
Gson gson = gsonBuilder.create();
Note note = getNote(noteId);
if (note == null) {
throw new IllegalArgumentException(noteId + "not found");
throw new IllegalArgumentException(noteId + " not found");
}
return gson.toJson(note);
}
@ -200,7 +200,8 @@ public class Notebook {
newNote.persist();
} catch (IOException e) {
throw new IOException(e);
logger.error(e.toString(), e);
throw e;
}
return newNote;