This commit is contained in:
duanfuxiang
2025-01-05 11:51:39 +08:00
commit 0c7ee142cb
215 changed files with 20611 additions and 0 deletions

20
src/database/exception.ts Normal file
View File

@@ -0,0 +1,20 @@
export class DatabaseException extends Error {
constructor(message: string) {
super(message)
this.name = 'DatabaseException'
}
}
export class DatabaseNotInitializedException extends DatabaseException {
constructor(message = 'Database not initialized') {
super(message)
this.name = 'DatabaseNotInitializedException'
}
}
export class DuplicateTemplateException extends DatabaseException {
constructor(templateName: string) {
super(`Template with name "${templateName}" already exists`)
this.name = 'DuplicateTemplateException'
}
}