ccashfrontend/views/node_modules/libphonenumber-js/source/ParseError.js
2021-06-18 09:20:09 +10:00

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