Skip to content

Commit c9d4d8f

Browse files
committed
LocalTree: Don't throw when trying to remove a non-existent item
1 parent 364999a commit c9d4d8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/LocalTree.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export default class LocalTree implements IResource {
122122
try {
123123
await this.queue.add(() => browser.bookmarks.remove(bookmarkId))
124124
} catch (e) {
125-
throw new Error('Could not remove ' + bookmark.inspect() + ': ' + e.message)
125+
Logger.log('Could not remove ' + bookmark.inspect() + ': ' + e.message + '\n Moving on')
126126
}
127127
}
128128

@@ -178,7 +178,7 @@ export default class LocalTree implements IResource {
178178
try {
179179
await this.queue.add(() => browser.bookmarks.removeTree(id))
180180
} catch (e) {
181-
throw new Error('Could not remove ' + folder.inspect() + ': ' + e.message)
181+
Logger.log('Could not remove ' + folder.inspect() + ': ' + e.message + '\n Moving on.')
182182
}
183183
}
184184

0 commit comments

Comments
 (0)