telme/lib/errors/base_error.ts

10 lines
266 B
TypeScript
Raw Normal View History

import ErrorCodes from './error_codes';
export default class BaseError extends Error {
readonly exitCode: ErrorCodes;
static readonly ErrorCodes = ErrorCodes;
constructor(message: string, code: ErrorCodes) {
super(message);
this.exitCode = code;
}
}