Express_Crud_Example/node_modules/bson/src/error.ts

24 lines
455 B
TypeScript
Raw Normal View History

2022-01-28 22:33:42 +01:00
/** @public */
export class BSONError extends Error {
constructor(message: string) {
super(message);
Object.setPrototypeOf(this, BSONError.prototype);
}
get name(): string {
return 'BSONError';
}
}
/** @public */
export class BSONTypeError extends TypeError {
constructor(message: string) {
super(message);
Object.setPrototypeOf(this, BSONTypeError.prototype);
}
get name(): string {
return 'BSONTypeError';
}
}