mirror of
https://github.com/zadam/trilium.git
synced 2026-05-07 20:37:57 +02:00
throwException instead of throwing exceptions manually (includes stacktrace)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user