1 | "use strict";
|
2 |
|
3 | var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4 |
|
5 | Object.defineProperty(exports, "__esModule", {
|
6 | value: true
|
7 | });
|
8 | exports.newError = newError;
|
9 | exports.PROTOCOL_ERROR = exports.SESSION_EXPIRED = exports.SERVICE_UNAVAILABLE = exports.Neo4jError = void 0;
|
10 |
|
11 | var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
12 |
|
13 | var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
14 |
|
15 | var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
16 |
|
17 | var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
18 |
|
19 | var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper"));
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 | var SERVICE_UNAVAILABLE = 'ServiceUnavailable';
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 | exports.SERVICE_UNAVAILABLE = SERVICE_UNAVAILABLE;
|
53 | var SESSION_EXPIRED = 'SessionExpired';
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 | exports.SESSION_EXPIRED = SESSION_EXPIRED;
|
60 | var PROTOCOL_ERROR = 'ProtocolError';
|
61 | exports.PROTOCOL_ERROR = PROTOCOL_ERROR;
|
62 |
|
63 | function newError(message) {
|
64 | var code = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'N/A';
|
65 |
|
66 |
|
67 | return new Neo4jError(message, code);
|
68 | }
|
69 |
|
70 |
|
71 |
|
72 |
|
73 |
|
74 | var Neo4jError =
|
75 |
|
76 | function (_Error) {
|
77 | (0, _inherits2["default"])(Neo4jError, _Error);
|
78 |
|
79 | |
80 |
|
81 |
|
82 |
|
83 |
|
84 | function Neo4jError(message) {
|
85 | var _this;
|
86 |
|
87 | var code = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'N/A';
|
88 | (0, _classCallCheck2["default"])(this, Neo4jError);
|
89 | _this = (0, _possibleConstructorReturn2["default"])(this, (0, _getPrototypeOf2["default"])(Neo4jError).call(this, message));
|
90 | _this.message = message;
|
91 | _this.code = code;
|
92 | _this.name = 'Neo4jError';
|
93 | return _this;
|
94 | }
|
95 |
|
96 | return Neo4jError;
|
97 | }((0, _wrapNativeSuper2["default"])(Error));
|
98 |
|
99 | exports.Neo4jError = Neo4jError; |
\ | No newline at end of file |