mirror of
https://github.com/sergeyyarkov/modbus-logger.git
synced 2026-10-11 18:38:51 +03:00
14 lines
316 B
JavaScript
14 lines
316 B
JavaScript
export class DomainError extends Error {
|
|
constructor(message) {
|
|
super(message);
|
|
this.name = this.constructor.name;
|
|
Error.captureStackTrace(this, this.constructor);
|
|
}
|
|
}
|
|
|
|
export class RowNotFoundError extends DomainError {
|
|
constructor() {
|
|
super('Row not found.');
|
|
this.statusCode = 404;
|
|
}
|
|
} |