@gjsify/querystring 0.3.15 → 0.3.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/error.js +1 -29
- package/lib/esm/index.js +1 -1055
- package/package.json +4 -4
- package/tsconfig.tsbuildinfo +1 -1
package/lib/esm/error.js
CHANGED
|
@@ -1,29 +1 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* All error instances in Node have additional methods and properties
|
|
4
|
-
* This export class is meant to be extended by these instances abstracting native JS error instances
|
|
5
|
-
*/
|
|
6
|
-
var NodeErrorAbstraction = class extends Error {
|
|
7
|
-
code;
|
|
8
|
-
constructor(name, code, message) {
|
|
9
|
-
super(message);
|
|
10
|
-
this.code = code;
|
|
11
|
-
this.name = name;
|
|
12
|
-
this.stack = this.stack && `${name} [${this.code}]${this.stack.slice(20)}`;
|
|
13
|
-
}
|
|
14
|
-
toString() {
|
|
15
|
-
return `${this.name} [${this.code}]: ${this.message}`;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
var NodeURIError = class extends NodeErrorAbstraction {
|
|
19
|
-
constructor(code, message) {
|
|
20
|
-
super(URIError.prototype.name, code, message);
|
|
21
|
-
Object.setPrototypeOf(this, URIError.prototype);
|
|
22
|
-
this.toString = function() {
|
|
23
|
-
return `${this.name} [${this.code}]: ${this.message}`;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
//#endregion
|
|
29
|
-
export { NodeErrorAbstraction, NodeURIError };
|
|
1
|
+
var e=class extends Error{code;constructor(e,t,n){super(n),this.code=t,this.name=e,this.stack=this.stack&&`${e} [${this.code}]${this.stack.slice(20)}`}toString(){return`${this.name} [${this.code}]: ${this.message}`}},t=class extends e{constructor(e,t){super(URIError.prototype.name,e,t),Object.setPrototypeOf(this,URIError.prototype),this.toString=function(){return`${this.name} [${this.code}]: ${this.message}`}}};export{e as NodeErrorAbstraction,t as NodeURIError};
|