mirror of
https://github.com/EthanMarti/infio-copilot.git
synced 2026-05-15 04:01:08 +00:00
init
This commit is contained in:
20
src/database/exception.ts
Normal file
20
src/database/exception.ts
Normal 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'
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user