improved logging

This commit is contained in:
zadam
2022-04-19 23:36:21 +02:00
parent 643a5e5b16
commit 3b58b83f8b
8 changed files with 25 additions and 25 deletions

View File

@@ -238,7 +238,7 @@ class Note extends AbstractEntity {
setContent(content, ignoreMissingProtectedSession = false) {
if (content === null || content === undefined) {
throw new Error(`Cannot set null content to note ${this.noteId}`);
throw new Error(`Cannot set null content to note '${this.noteId}'`);
}
if (this.isStringNote()) {
@@ -260,7 +260,7 @@ class Note extends AbstractEntity {
pojo.content = protectedSessionService.encrypt(pojo.content);
}
else if (!ignoreMissingProtectedSession) {
throw new Error(`Cannot update content of noteId=${this.noteId} since we're out of protected session.`);
throw new Error(`Cannot update content of noteId '${this.noteId}' since we're out of protected session.`);
}
}