Errors
Path:
_archive/loom-stale-pre-sprint-snapshot/src/types/errors.tsRelative: loom-stale-pre-sprint-snapshot/src/types/errors.tsSubproject: _archiveCategory: archivedLines: 68Bytes: 2,662Imports: 0Exports: 8
Content Preview
- /** Typed error hierarchy — never throw bare Error, never swallow. */
- export abstract class LoomError extends Error {
- abstract readonly code: string;
- readonly ts: string = new Date().toISOString();
- constructor(message: string, readonly detail?: unknown) {
- super(message);
- this.name = new.target.name;
- }
- toJSON(): { code: string; name: string; message: string; ts: string; detail?: unknown } {
- return { code: this.code, name: this.name, message: this.message, ts: this.ts, detai