19 lines
572 B
TypeScript
19 lines
572 B
TypeScript
import type { IDomainError } from '@gridpilot/shared/errors';
|
|
|
|
/**
|
|
* 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);
|
|
}
|
|
} |