- Add GETTING_STARTED.md with quick start guide and development modes - Add INSTALL.sh automated installation script - Add INSTALLATION_CHECKLIST.md, INSTALLATION_SUCCESS.md, and INSTALLATION_SUMMARY.md - Add QUICK_REFERENCE.md for common commands - Add SETUP_GUIDE.md with detailed setup instructions - Update README.md with improved project overview - Add did-wallet app dependencies and node_modules
23 lines
655 B
JavaScript
23 lines
655 B
JavaScript
'use strict'
|
|
|
|
module.exports = class ModuleError extends Error {
|
|
/**
|
|
* @param {string} message Error message
|
|
* @param {{ code?: string, cause?: Error, expected?: boolean, transient?: boolean }} [options]
|
|
*/
|
|
constructor (message, options) {
|
|
super(message || '')
|
|
|
|
if (typeof options === 'object' && options !== null) {
|
|
if (options.code) this.code = String(options.code)
|
|
if (options.expected) this.expected = true
|
|
if (options.transient) this.transient = true
|
|
if (options.cause) this.cause = options.cause
|
|
}
|
|
|
|
if (Error.captureStackTrace) {
|
|
Error.captureStackTrace(this, this.constructor)
|
|
}
|
|
}
|
|
}
|