throwException instead of throwing exceptions manually (includes stacktrace)

This commit is contained in:
azivner
2017-12-06 19:53:23 -05:00
parent a7831ebfcd
commit a0bbd8c853
9 changed files with 16 additions and 12 deletions

View File

@@ -25,7 +25,7 @@ const noteTree = (function() {
let title = noteIdToTitle[noteId];
if (!title) {
throw new Error("Can't find title for noteId='" + noteId + "'");
throwError("Can't find title for noteId='" + noteId + "'");
}
if (parentNoteId !== null) {
@@ -265,7 +265,7 @@ const noteTree = (function() {
const parents = childToParents[noteId];
if (!parents) {
throw new Error("Can't find parents for noteId=" + noteId);
throwError("Can't find parents for noteId=" + noteId);
}
if (parents.length <= 1) {