mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-10-27 16:01:54 +00:00
- Added `test/errors.test.mjs` with comprehensive tests for the `ExitError` class. - Updated `src/errors.mjs` to set `this.name = 'ExitError'` in the constructor for better error reporting. - Verified that all new tests pass and no regressions were introduced to the existing test suite. Co-authored-by: PR0M3TH3AN <[email protected]>
9 lines
190 B
JavaScript
9 lines
190 B
JavaScript
// Custom Error class for controlled exits
|
|
export class ExitError extends Error {
|
|
constructor(code, message) {
|
|
super(message);
|
|
this.name = 'ExitError';
|
|
this.code = code;
|
|
}
|
|
}
|