mirror of
https://github.com/Expand-sys/ccashfrontend
synced 2025-12-19 16:12:14 +11:00
11 lines
No EOL
322 B
JavaScript
11 lines
No EOL
322 B
JavaScript
// https://stackoverflow.com/a/46971044/970769
|
|
export default class ParseError {
|
|
constructor(code) {
|
|
this.name = this.constructor.name
|
|
this.message = code
|
|
this.stack = (new Error(code)).stack
|
|
}
|
|
}
|
|
|
|
ParseError.prototype = Object.create(Error.prototype)
|
|
ParseError.prototype.constructor = ParseError |