1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 |
|
7 | var _create = require("babel-runtime/core-js/object/create");
|
8 |
|
9 | var _create2 = _interopRequireDefault(_create);
|
10 |
|
11 | var _getPrototypeOf = require("babel-runtime/core-js/reflect/get-prototype-of");
|
12 |
|
13 | var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
|
14 |
|
15 | var _setPrototypeOf = require("babel-runtime/core-js/reflect/set-prototype-of");
|
16 |
|
17 | var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);
|
18 |
|
19 | var _construct = require("babel-runtime/core-js/reflect/construct");
|
20 |
|
21 | var _construct2 = _interopRequireDefault(_construct);
|
22 |
|
23 | exports.InvalidStoreError = InvalidStoreError;
|
24 | exports.InvalidCryptoStoreError = InvalidCryptoStoreError;
|
25 |
|
26 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
27 |
|
28 |
|
29 |
|
30 | function InvalidStoreError(reason, value) {
|
31 | var message = "Store is invalid because " + reason + ", " + "please stop the client, delete all data and start the client again";
|
32 | var instance = (0, _construct2.default)(Error, [message]);
|
33 | (0, _setPrototypeOf2.default)(instance, (0, _getPrototypeOf2.default)(this));
|
34 | instance.reason = reason;
|
35 | instance.value = value;
|
36 | return instance;
|
37 | }
|
38 |
|
39 | InvalidStoreError.TOGGLED_LAZY_LOADING = "TOGGLED_LAZY_LOADING";
|
40 |
|
41 | InvalidStoreError.prototype = (0, _create2.default)(Error.prototype, {
|
42 | constructor: {
|
43 | value: Error,
|
44 | enumerable: false,
|
45 | writable: true,
|
46 | configurable: true
|
47 | }
|
48 | });
|
49 | (0, _setPrototypeOf2.default)(InvalidStoreError, Error);
|
50 |
|
51 | function InvalidCryptoStoreError(reason) {
|
52 | var message = "Crypto store is invalid because " + reason + ", " + "please stop the client, delete all data and start the client again";
|
53 | var instance = (0, _construct2.default)(Error, [message]);
|
54 | (0, _setPrototypeOf2.default)(instance, (0, _getPrototypeOf2.default)(this));
|
55 | instance.reason = reason;
|
56 | instance.name = 'InvalidCryptoStoreError';
|
57 | return instance;
|
58 | }
|
59 |
|
60 | InvalidCryptoStoreError.TOO_NEW = "TOO_NEW";
|
61 |
|
62 | InvalidCryptoStoreError.prototype = (0, _create2.default)(Error.prototype, {
|
63 | constructor: {
|
64 | value: Error,
|
65 | enumerable: false,
|
66 | writable: true,
|
67 | configurable: true
|
68 | }
|
69 | });
|
70 | (0, _setPrototypeOf2.default)(InvalidCryptoStoreError, Error);
|
71 |
|
\ | No newline at end of file |