wip
This commit is contained in:
@@ -1,8 +1,19 @@
|
||||
export class AutomationDomainError extends Error {
|
||||
readonly name: string = 'AutomationDomainError';
|
||||
import type { IDomainError } from '@gridpilot/shared/errors';
|
||||
|
||||
constructor(message: string) {
|
||||
/**
|
||||
* Domain Error: AutomationDomainError
|
||||
*
|
||||
* Implements the shared IDomainError contract for automation domain failures.
|
||||
*/
|
||||
export class AutomationDomainError extends Error implements IDomainError {
|
||||
readonly name = 'AutomationDomainError';
|
||||
readonly type = 'domain' as const;
|
||||
readonly context = 'automation';
|
||||
readonly kind: string;
|
||||
|
||||
constructor(message: string, kind: string = 'validation') {
|
||||
super(message);
|
||||
this.kind = kind;
|
||||
Object.setPrototypeOf(this, new.target.prototype);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user