UNPKG

681 BJavaScriptView Raw
1/*
2* h54s error constructor
3* @constructor
4*
5*@param {string} type - Error type
6*@param {string} message - Error message
7*@param {string} status - Error status returned from SAS
8*
9*/
10function h54sError(type, message, status) {
11 if(Error.captureStackTrace) {
12 Error.captureStackTrace(this);
13 }
14 this.message = message;
15 this.type = type;
16 this.status = status;
17}
18
19h54sError.prototype = Object.create(Error.prototype, {
20 constructor: {
21 configurable: false,
22 enumerable: false,
23 writable: false,
24 value: h54sError
25 },
26 name: {
27 configurable: false,
28 enumerable: false,
29 writable: false,
30 value: 'h54sError'
31 }
32});
33
34module.exports = h54sError;