30 lines
643 B
TypeScript
30 lines
643 B
TypeScript
|
/**
|
||
|
* Custom error classes for better error handling
|
||
|
*/
|
||
|
export class NftBaseError extends Error {
|
||
|
constructor(message: string) {
|
||
|
super(message);
|
||
|
this.name = 'NftBaseError';
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export class NftValidationError extends NftBaseError {
|
||
|
constructor(message: string) {
|
||
|
super(message);
|
||
|
this.name = 'NftValidationError';
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export class NftExecutionError extends NftBaseError {
|
||
|
constructor(message: string) {
|
||
|
super(message);
|
||
|
this.name = 'NftExecutionError';
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export class NftResourceError extends NftBaseError {
|
||
|
constructor(message: string) {
|
||
|
super(message);
|
||
|
this.name = 'NftResourceError';
|
||
|
}
|
||
|
}
|