MCPcopy Create free account
hub / github.com/dresende/node-orm2 / ORMError

Function ORMError

lib/Error.js:12–29  ·  view source on GitHub ↗
(message, code, extras)

Source from the content-addressed store, hash-verified

10};
11
12function ORMError(message, code, extras) {
13 Error.call(this);
14 Error.captureStackTrace(this, this.constructor);
15
16 this.message = message;
17 if (code) {
18 this.code = codes[code];
19 this.literalCode = code;
20 if (!this.code) {
21 throw new Error("Invalid error code: " + code);
22 }
23 }
24 if (extras) {
25 for(var k in extras) {
26 this[k] = extras[k];
27 }
28 }
29}
30
31ORMError.prototype = Object.create(Error.prototype);
32ORMError.prototype.constructor = ORMError;

Callers

nothing calls this directly

Calls 1

callMethod · 0.80

Tested by

no test coverage detected