Files
bella/node_modules/bare-os/lib/errors.js
你的名字 4c2f5c69a1 chore: update node_modules with new binary files and dependencies
- Add new binary files for nodemon, onnxruntime-web, and xenova/transformers
- Update various JavaScript and TypeScript files in node_modules
- Remove unused files and dependencies
- Add new test fixtures and documentation files
2025-07-18 08:41:48 +08:00

23 lines
479 B
JavaScript

module.exports = class OSError extends Error {
constructor(msg, code, fn = OSError) {
super(`${code}: ${msg}`)
this.code = code
if (Error.captureStackTrace) {
Error.captureStackTrace(this, fn)
}
}
get name() {
return 'OSError'
}
static UNKNOWN_SIGNAL(msg) {
return new OSError(msg, 'UNKNOWN_SIGNAL', OSError.UNKNOWN_SIGNAL)
}
static TITLE_OVERFLOW(msg) {
return new OSError(msg, 'TITLE_OVERFLOW', OSError.TITLE_OVERFLOW)
}
}