11export class MissingParamError extends Error {
22 constructor ( param : string ) {
33 super ( `Missing param : ${ param } ` )
4- this . name = "Missing Parameter Error "
4+ this . name = "MissingParamError "
55 }
66}
77
88export class CollectionNotFoundError extends Error {
99 constructor ( collection : string ) {
1010 super ( `Collection ${ collection } was not found in database` )
11- this . name = "Collection Not Found "
11+ this . name = "CollectionNotFoundError "
1212 }
1313}
1414
1515
1616export class DatabaseError extends Error {
1717 constructor ( err : string ) {
1818 super ( err )
19- this . name = "Database Error "
19+ this . name = "DatabaseError "
2020 }
2121}
2222
2323export class NotFoundError extends Error {
2424 constructor ( err : string ) {
2525 super ( err )
26- this . name = "Not Found Error "
26+ this . name = "NotFoundError "
2727 }
2828}
2929
3030export class DuplicationError extends Error {
3131 constructor ( err ? : string ) {
3232 super ( err || "Duplication error occured" )
33- this . name = "Duplication error "
33+ this . name = "DuplicationError "
3434 }
3535}
3636
3737export class CreateFileError extends Error {
3838 constructor ( err ? : string ) {
3939 super ( err || "Failed to create database.json" )
40- this . name = "CreateFile Error "
40+ this . name = "CreateFileError "
4141 }
4242
4343}
0 commit comments