mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 03:20:12 +08:00
feat: add error handling for duplicate or not exists
This commit is contained in:
1 parent
9b78f0d41c
commit
5a1fc6499a
3 files changed
+86
-56
No files matched your search
@@ -0,0 +1,14 @@
|
||||
/* eslint-disable max-classes-per-file */
|
||||
export class DuplicateItemError extends Error {
|
||||
constructor(message) {
|
||||
super(message)
|
||||
this.name = 'DuplicateItemError'
|
||||
}
|
||||
}
|
||||
|
||||
export class ParentNotExistsError extends Error {
|
||||
constructor(message) {
|
||||
super(message)
|
||||
this.name = 'ParentNotExistsError'
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user