UNPKG

523 BJavaScriptView Raw
1const AliImgError = function (message, code) {
2 this.message = message
3 this.code = code || -1
4 this.name = 'AliImgError'
5 Error.captureStackTrace(this, AliImgError)
6}
7AliImgError.prototype = Object.create(Error.prototype)
8
9const HTTPError = function (statusCode, message) {
10 this.statusCode = statusCode
11 this.message = message || ''
12 this.name = 'HTTPError'
13 Error.captureStackTrace(this, HTTPError)
14}
15HTTPError.prototype = Object.create(Error.prototype)
16
17module.exports = {AliImgError, HTTPError}
\No newline at end of file