@dxos/errors 0.8.4-main.67995b8 → 0.8.4-main.69d29f4
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/dist/lib/browser/index.mjs +50 -42
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +50 -42
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/base.d.ts +34 -36
- package/dist/types/src/base.d.ts.map +1 -1
- package/dist/types/src/errors.d.ts +247 -228
- package/dist/types/src/errors.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -4
- package/src/base.ts +40 -37
- package/src/errors.test.ts +25 -5
- package/src/errors.ts +8 -6
|
@@ -1,369 +1,388 @@
|
|
|
1
1
|
import { BaseError } from './base';
|
|
2
|
-
declare const
|
|
3
|
-
new (
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
readonly _tag: "TIMEOUT";
|
|
9
|
-
readonly context: Record<string, unknown>;
|
|
10
|
-
message: string;
|
|
2
|
+
declare const ApiError_base: {
|
|
3
|
+
new (options?: import("./base").BaseErrorOptions): {
|
|
4
|
+
name: "ApiError";
|
|
5
|
+
context: Record<string, unknown>;
|
|
6
|
+
get message(): string;
|
|
7
|
+
get _tag(): "ApiError";
|
|
11
8
|
stack?: string;
|
|
12
9
|
cause?: unknown;
|
|
13
10
|
};
|
|
14
|
-
|
|
11
|
+
name: "ApiError";
|
|
15
12
|
is(error: unknown): error is BaseError;
|
|
16
|
-
wrap(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
message: string;
|
|
13
|
+
wrap(options?: (Omit<import("./base").BaseErrorOptions, "cause"> & {
|
|
14
|
+
ifTypeDiffers?: boolean;
|
|
15
|
+
}) | undefined): (error: unknown) => {
|
|
16
|
+
name: "ApiError";
|
|
17
|
+
context: Record<string, unknown>;
|
|
18
|
+
get message(): string;
|
|
19
|
+
get _tag(): "ApiError";
|
|
24
20
|
stack?: string;
|
|
25
21
|
cause?: unknown;
|
|
26
22
|
};
|
|
27
|
-
extend<
|
|
28
|
-
new (
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
readonly _tag: Code;
|
|
34
|
-
readonly context: Record<string, unknown>;
|
|
35
|
-
message: string;
|
|
23
|
+
extend<Name extends string = string>(name: Name, message?: string): {
|
|
24
|
+
new (options?: import("./base").BaseErrorOptions): {
|
|
25
|
+
name: Name;
|
|
26
|
+
context: Record<string, unknown>;
|
|
27
|
+
get message(): string;
|
|
28
|
+
get _tag(): Name;
|
|
36
29
|
stack?: string;
|
|
37
30
|
cause?: unknown;
|
|
38
31
|
};
|
|
39
|
-
|
|
32
|
+
name: Name;
|
|
40
33
|
is(error: unknown): error is BaseError;
|
|
41
|
-
wrap(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
message: string;
|
|
34
|
+
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause"> & {
|
|
35
|
+
ifTypeDiffers?: boolean;
|
|
36
|
+
}): (error: unknown) => {
|
|
37
|
+
name: Name;
|
|
38
|
+
context: Record<string, unknown>;
|
|
39
|
+
get message(): string;
|
|
40
|
+
get _tag(): Name;
|
|
49
41
|
stack?: string;
|
|
50
42
|
cause?: unknown;
|
|
51
43
|
};
|
|
52
|
-
extend<
|
|
44
|
+
extend<Name extends string = string>(name: Name, message?: string): /*elided*/ any;
|
|
45
|
+
isError(error: unknown): error is Error;
|
|
53
46
|
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
54
47
|
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
55
48
|
stackTraceLimit: number;
|
|
56
49
|
};
|
|
50
|
+
isError(error: unknown): error is Error;
|
|
57
51
|
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
58
52
|
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
59
53
|
stackTraceLimit: number;
|
|
60
54
|
};
|
|
61
|
-
export declare class
|
|
55
|
+
export declare class ApiError extends ApiError_base {
|
|
62
56
|
}
|
|
63
|
-
declare const
|
|
64
|
-
new (
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
readonly _tag: "ABORTED";
|
|
70
|
-
readonly context: Record<string, unknown>;
|
|
71
|
-
message: string;
|
|
57
|
+
declare const SystemError_base: {
|
|
58
|
+
new (options?: import("./base").BaseErrorOptions): {
|
|
59
|
+
name: "SystemError";
|
|
60
|
+
context: Record<string, unknown>;
|
|
61
|
+
get message(): string;
|
|
62
|
+
get _tag(): "SystemError";
|
|
72
63
|
stack?: string;
|
|
73
64
|
cause?: unknown;
|
|
74
65
|
};
|
|
75
|
-
|
|
66
|
+
name: "SystemError";
|
|
76
67
|
is(error: unknown): error is BaseError;
|
|
77
|
-
wrap(
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
message: string;
|
|
68
|
+
wrap(options?: (Omit<import("./base").BaseErrorOptions, "cause"> & {
|
|
69
|
+
ifTypeDiffers?: boolean;
|
|
70
|
+
}) | undefined): (error: unknown) => {
|
|
71
|
+
name: "SystemError";
|
|
72
|
+
context: Record<string, unknown>;
|
|
73
|
+
get message(): string;
|
|
74
|
+
get _tag(): "SystemError";
|
|
85
75
|
stack?: string;
|
|
86
76
|
cause?: unknown;
|
|
87
77
|
};
|
|
88
|
-
extend<
|
|
89
|
-
new (
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
readonly _tag: Code;
|
|
95
|
-
readonly context: Record<string, unknown>;
|
|
96
|
-
message: string;
|
|
78
|
+
extend<Name extends string = string>(name: Name, message?: string): {
|
|
79
|
+
new (options?: import("./base").BaseErrorOptions): {
|
|
80
|
+
name: Name;
|
|
81
|
+
context: Record<string, unknown>;
|
|
82
|
+
get message(): string;
|
|
83
|
+
get _tag(): Name;
|
|
97
84
|
stack?: string;
|
|
98
85
|
cause?: unknown;
|
|
99
86
|
};
|
|
100
|
-
|
|
87
|
+
name: Name;
|
|
101
88
|
is(error: unknown): error is BaseError;
|
|
102
|
-
wrap(
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
message: string;
|
|
89
|
+
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause"> & {
|
|
90
|
+
ifTypeDiffers?: boolean;
|
|
91
|
+
}): (error: unknown) => {
|
|
92
|
+
name: Name;
|
|
93
|
+
context: Record<string, unknown>;
|
|
94
|
+
get message(): string;
|
|
95
|
+
get _tag(): Name;
|
|
110
96
|
stack?: string;
|
|
111
97
|
cause?: unknown;
|
|
112
98
|
};
|
|
113
|
-
extend<
|
|
99
|
+
extend<Name extends string = string>(name: Name, message?: string): /*elided*/ any;
|
|
100
|
+
isError(error: unknown): error is Error;
|
|
114
101
|
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
115
102
|
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
116
103
|
stackTraceLimit: number;
|
|
117
104
|
};
|
|
105
|
+
isError(error: unknown): error is Error;
|
|
118
106
|
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
119
107
|
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
120
108
|
stackTraceLimit: number;
|
|
121
109
|
};
|
|
122
|
-
export declare class
|
|
110
|
+
export declare class SystemError extends SystemError_base {
|
|
123
111
|
}
|
|
124
|
-
declare const
|
|
125
|
-
new (
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
readonly _tag: "UNIMPLEMENTED";
|
|
131
|
-
readonly context: Record<string, unknown>;
|
|
132
|
-
message: string;
|
|
112
|
+
declare const InternalError_base: {
|
|
113
|
+
new (options?: import("./base").BaseErrorOptions): {
|
|
114
|
+
name: "InternalError";
|
|
115
|
+
context: Record<string, unknown>;
|
|
116
|
+
get message(): string;
|
|
117
|
+
get _tag(): "InternalError";
|
|
133
118
|
stack?: string;
|
|
134
119
|
cause?: unknown;
|
|
135
120
|
};
|
|
136
|
-
|
|
121
|
+
name: "InternalError";
|
|
137
122
|
is(error: unknown): error is BaseError;
|
|
138
|
-
wrap(
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
message: string;
|
|
123
|
+
wrap(options?: (Omit<import("./base").BaseErrorOptions, "cause"> & {
|
|
124
|
+
ifTypeDiffers?: boolean;
|
|
125
|
+
}) | undefined): (error: unknown) => {
|
|
126
|
+
name: "InternalError";
|
|
127
|
+
context: Record<string, unknown>;
|
|
128
|
+
get message(): string;
|
|
129
|
+
get _tag(): "InternalError";
|
|
146
130
|
stack?: string;
|
|
147
131
|
cause?: unknown;
|
|
148
132
|
};
|
|
149
|
-
extend<
|
|
150
|
-
new (
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
readonly _tag: Code;
|
|
156
|
-
readonly context: Record<string, unknown>;
|
|
157
|
-
message: string;
|
|
133
|
+
extend<Name extends string = string>(name: Name, message?: string): {
|
|
134
|
+
new (options?: import("./base").BaseErrorOptions): {
|
|
135
|
+
name: Name;
|
|
136
|
+
context: Record<string, unknown>;
|
|
137
|
+
get message(): string;
|
|
138
|
+
get _tag(): Name;
|
|
158
139
|
stack?: string;
|
|
159
140
|
cause?: unknown;
|
|
160
141
|
};
|
|
161
|
-
|
|
142
|
+
name: Name;
|
|
162
143
|
is(error: unknown): error is BaseError;
|
|
163
|
-
wrap(
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
message: string;
|
|
144
|
+
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause"> & {
|
|
145
|
+
ifTypeDiffers?: boolean;
|
|
146
|
+
}): (error: unknown) => {
|
|
147
|
+
name: Name;
|
|
148
|
+
context: Record<string, unknown>;
|
|
149
|
+
get message(): string;
|
|
150
|
+
get _tag(): Name;
|
|
171
151
|
stack?: string;
|
|
172
152
|
cause?: unknown;
|
|
173
153
|
};
|
|
174
|
-
extend<
|
|
154
|
+
extend<Name extends string = string>(name: Name, message?: string): /*elided*/ any;
|
|
155
|
+
isError(error: unknown): error is Error;
|
|
175
156
|
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
176
157
|
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
177
158
|
stackTraceLimit: number;
|
|
178
159
|
};
|
|
160
|
+
isError(error: unknown): error is Error;
|
|
179
161
|
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
180
162
|
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
181
163
|
stackTraceLimit: number;
|
|
182
164
|
};
|
|
183
|
-
export declare class
|
|
165
|
+
export declare class InternalError extends InternalError_base {
|
|
184
166
|
}
|
|
185
|
-
declare const
|
|
186
|
-
new (
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
readonly _tag: "API_ERROR";
|
|
192
|
-
readonly context: Record<string, unknown>;
|
|
193
|
-
message: string;
|
|
167
|
+
declare const TimeoutError_base: {
|
|
168
|
+
new (options?: import("./base").BaseErrorOptions): {
|
|
169
|
+
name: "TimeoutError";
|
|
170
|
+
context: Record<string, unknown>;
|
|
171
|
+
get message(): string;
|
|
172
|
+
get _tag(): "TimeoutError";
|
|
194
173
|
stack?: string;
|
|
195
174
|
cause?: unknown;
|
|
196
175
|
};
|
|
197
|
-
|
|
176
|
+
name: "TimeoutError";
|
|
198
177
|
is(error: unknown): error is BaseError;
|
|
199
|
-
wrap(
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
message: string;
|
|
178
|
+
wrap(options?: (Omit<import("./base").BaseErrorOptions, "cause"> & {
|
|
179
|
+
ifTypeDiffers?: boolean;
|
|
180
|
+
}) | undefined): (error: unknown) => {
|
|
181
|
+
name: "TimeoutError";
|
|
182
|
+
context: Record<string, unknown>;
|
|
183
|
+
get message(): string;
|
|
184
|
+
get _tag(): "TimeoutError";
|
|
207
185
|
stack?: string;
|
|
208
186
|
cause?: unknown;
|
|
209
187
|
};
|
|
210
|
-
extend<
|
|
211
|
-
new (
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
readonly _tag: Code;
|
|
217
|
-
readonly context: Record<string, unknown>;
|
|
218
|
-
message: string;
|
|
188
|
+
extend<Name extends string = string>(name: Name, message?: string): {
|
|
189
|
+
new (options?: import("./base").BaseErrorOptions): {
|
|
190
|
+
name: Name;
|
|
191
|
+
context: Record<string, unknown>;
|
|
192
|
+
get message(): string;
|
|
193
|
+
get _tag(): Name;
|
|
219
194
|
stack?: string;
|
|
220
195
|
cause?: unknown;
|
|
221
196
|
};
|
|
222
|
-
|
|
197
|
+
name: Name;
|
|
223
198
|
is(error: unknown): error is BaseError;
|
|
224
|
-
wrap(
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
message: string;
|
|
199
|
+
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause"> & {
|
|
200
|
+
ifTypeDiffers?: boolean;
|
|
201
|
+
}): (error: unknown) => {
|
|
202
|
+
name: Name;
|
|
203
|
+
context: Record<string, unknown>;
|
|
204
|
+
get message(): string;
|
|
205
|
+
get _tag(): Name;
|
|
232
206
|
stack?: string;
|
|
233
207
|
cause?: unknown;
|
|
234
208
|
};
|
|
235
|
-
extend<
|
|
209
|
+
extend<Name extends string = string>(name: Name, message?: string): /*elided*/ any;
|
|
210
|
+
isError(error: unknown): error is Error;
|
|
236
211
|
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
237
212
|
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
238
213
|
stackTraceLimit: number;
|
|
239
214
|
};
|
|
215
|
+
isError(error: unknown): error is Error;
|
|
240
216
|
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
241
217
|
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
242
218
|
stackTraceLimit: number;
|
|
243
219
|
};
|
|
244
|
-
export declare class
|
|
220
|
+
export declare class TimeoutError extends TimeoutError_base {
|
|
245
221
|
}
|
|
246
|
-
declare const
|
|
247
|
-
new (
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
readonly _tag: "SYSTEM_ERROR";
|
|
253
|
-
readonly context: Record<string, unknown>;
|
|
254
|
-
message: string;
|
|
222
|
+
declare const AbortedError_base: {
|
|
223
|
+
new (options?: import("./base").BaseErrorOptions): {
|
|
224
|
+
name: "AbortedError";
|
|
225
|
+
context: Record<string, unknown>;
|
|
226
|
+
get message(): string;
|
|
227
|
+
get _tag(): "AbortedError";
|
|
255
228
|
stack?: string;
|
|
256
229
|
cause?: unknown;
|
|
257
230
|
};
|
|
258
|
-
|
|
231
|
+
name: "AbortedError";
|
|
259
232
|
is(error: unknown): error is BaseError;
|
|
260
|
-
wrap(
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
message: string;
|
|
233
|
+
wrap(options?: (Omit<import("./base").BaseErrorOptions, "cause"> & {
|
|
234
|
+
ifTypeDiffers?: boolean;
|
|
235
|
+
}) | undefined): (error: unknown) => {
|
|
236
|
+
name: "AbortedError";
|
|
237
|
+
context: Record<string, unknown>;
|
|
238
|
+
get message(): string;
|
|
239
|
+
get _tag(): "AbortedError";
|
|
268
240
|
stack?: string;
|
|
269
241
|
cause?: unknown;
|
|
270
242
|
};
|
|
271
|
-
extend<
|
|
272
|
-
new (
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
readonly _tag: Code;
|
|
278
|
-
readonly context: Record<string, unknown>;
|
|
279
|
-
message: string;
|
|
243
|
+
extend<Name extends string = string>(name: Name, message?: string): {
|
|
244
|
+
new (options?: import("./base").BaseErrorOptions): {
|
|
245
|
+
name: Name;
|
|
246
|
+
context: Record<string, unknown>;
|
|
247
|
+
get message(): string;
|
|
248
|
+
get _tag(): Name;
|
|
280
249
|
stack?: string;
|
|
281
250
|
cause?: unknown;
|
|
282
251
|
};
|
|
283
|
-
|
|
252
|
+
name: Name;
|
|
284
253
|
is(error: unknown): error is BaseError;
|
|
285
|
-
wrap(
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
message: string;
|
|
254
|
+
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause"> & {
|
|
255
|
+
ifTypeDiffers?: boolean;
|
|
256
|
+
}): (error: unknown) => {
|
|
257
|
+
name: Name;
|
|
258
|
+
context: Record<string, unknown>;
|
|
259
|
+
get message(): string;
|
|
260
|
+
get _tag(): Name;
|
|
293
261
|
stack?: string;
|
|
294
262
|
cause?: unknown;
|
|
295
263
|
};
|
|
296
|
-
extend<
|
|
264
|
+
extend<Name extends string = string>(name: Name, message?: string): /*elided*/ any;
|
|
265
|
+
isError(error: unknown): error is Error;
|
|
297
266
|
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
298
267
|
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
299
268
|
stackTraceLimit: number;
|
|
300
269
|
};
|
|
270
|
+
isError(error: unknown): error is Error;
|
|
301
271
|
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
302
272
|
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
303
273
|
stackTraceLimit: number;
|
|
304
274
|
};
|
|
305
|
-
export declare class
|
|
275
|
+
export declare class AbortedError extends AbortedError_base {
|
|
306
276
|
}
|
|
307
|
-
declare const
|
|
308
|
-
new (
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
readonly _tag: "INTERNAL_ERROR";
|
|
314
|
-
readonly context: Record<string, unknown>;
|
|
315
|
-
message: string;
|
|
277
|
+
declare const NotImplementedError_base: {
|
|
278
|
+
new (options?: import("./base").BaseErrorOptions): {
|
|
279
|
+
name: "NotImplementedError";
|
|
280
|
+
context: Record<string, unknown>;
|
|
281
|
+
get message(): string;
|
|
282
|
+
get _tag(): "NotImplementedError";
|
|
316
283
|
stack?: string;
|
|
317
284
|
cause?: unknown;
|
|
318
285
|
};
|
|
319
|
-
|
|
286
|
+
name: "NotImplementedError";
|
|
320
287
|
is(error: unknown): error is BaseError;
|
|
321
|
-
wrap(
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
message: string;
|
|
288
|
+
wrap(options?: (Omit<import("./base").BaseErrorOptions, "cause"> & {
|
|
289
|
+
ifTypeDiffers?: boolean;
|
|
290
|
+
}) | undefined): (error: unknown) => {
|
|
291
|
+
name: "NotImplementedError";
|
|
292
|
+
context: Record<string, unknown>;
|
|
293
|
+
get message(): string;
|
|
294
|
+
get _tag(): "NotImplementedError";
|
|
329
295
|
stack?: string;
|
|
330
296
|
cause?: unknown;
|
|
331
297
|
};
|
|
332
|
-
extend<
|
|
333
|
-
new (
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
readonly _tag: Code;
|
|
339
|
-
readonly context: Record<string, unknown>;
|
|
340
|
-
message: string;
|
|
298
|
+
extend<Name extends string = string>(name: Name, message?: string): {
|
|
299
|
+
new (options?: import("./base").BaseErrorOptions): {
|
|
300
|
+
name: Name;
|
|
301
|
+
context: Record<string, unknown>;
|
|
302
|
+
get message(): string;
|
|
303
|
+
get _tag(): Name;
|
|
341
304
|
stack?: string;
|
|
342
305
|
cause?: unknown;
|
|
343
306
|
};
|
|
344
|
-
|
|
307
|
+
name: Name;
|
|
345
308
|
is(error: unknown): error is BaseError;
|
|
346
|
-
wrap(
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
message: string;
|
|
309
|
+
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause"> & {
|
|
310
|
+
ifTypeDiffers?: boolean;
|
|
311
|
+
}): (error: unknown) => {
|
|
312
|
+
name: Name;
|
|
313
|
+
context: Record<string, unknown>;
|
|
314
|
+
get message(): string;
|
|
315
|
+
get _tag(): Name;
|
|
354
316
|
stack?: string;
|
|
355
317
|
cause?: unknown;
|
|
356
318
|
};
|
|
357
|
-
extend<
|
|
319
|
+
extend<Name extends string = string>(name: Name, message?: string): /*elided*/ any;
|
|
320
|
+
isError(error: unknown): error is Error;
|
|
358
321
|
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
359
322
|
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
360
323
|
stackTraceLimit: number;
|
|
361
324
|
};
|
|
325
|
+
isError(error: unknown): error is Error;
|
|
362
326
|
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
363
327
|
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
364
328
|
stackTraceLimit: number;
|
|
365
329
|
};
|
|
366
|
-
export declare class
|
|
330
|
+
export declare class NotImplementedError extends NotImplementedError_base {
|
|
331
|
+
}
|
|
332
|
+
declare const RuntimeServiceError_base: {
|
|
333
|
+
new (options?: import("./base").BaseErrorOptions): {
|
|
334
|
+
name: "RuntimeServiceError";
|
|
335
|
+
context: Record<string, unknown>;
|
|
336
|
+
get message(): string;
|
|
337
|
+
get _tag(): "RuntimeServiceError";
|
|
338
|
+
stack?: string;
|
|
339
|
+
cause?: unknown;
|
|
340
|
+
};
|
|
341
|
+
name: "RuntimeServiceError";
|
|
342
|
+
is(error: unknown): error is BaseError;
|
|
343
|
+
wrap(options?: (Omit<import("./base").BaseErrorOptions, "cause"> & {
|
|
344
|
+
ifTypeDiffers?: boolean;
|
|
345
|
+
}) | undefined): (error: unknown) => {
|
|
346
|
+
name: "RuntimeServiceError";
|
|
347
|
+
context: Record<string, unknown>;
|
|
348
|
+
get message(): string;
|
|
349
|
+
get _tag(): "RuntimeServiceError";
|
|
350
|
+
stack?: string;
|
|
351
|
+
cause?: unknown;
|
|
352
|
+
};
|
|
353
|
+
extend<Name extends string = string>(name: Name, message?: string): {
|
|
354
|
+
new (options?: import("./base").BaseErrorOptions): {
|
|
355
|
+
name: Name;
|
|
356
|
+
context: Record<string, unknown>;
|
|
357
|
+
get message(): string;
|
|
358
|
+
get _tag(): Name;
|
|
359
|
+
stack?: string;
|
|
360
|
+
cause?: unknown;
|
|
361
|
+
};
|
|
362
|
+
name: Name;
|
|
363
|
+
is(error: unknown): error is BaseError;
|
|
364
|
+
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause"> & {
|
|
365
|
+
ifTypeDiffers?: boolean;
|
|
366
|
+
}): (error: unknown) => {
|
|
367
|
+
name: Name;
|
|
368
|
+
context: Record<string, unknown>;
|
|
369
|
+
get message(): string;
|
|
370
|
+
get _tag(): Name;
|
|
371
|
+
stack?: string;
|
|
372
|
+
cause?: unknown;
|
|
373
|
+
};
|
|
374
|
+
extend<Name extends string = string>(name: Name, message?: string): /*elided*/ any;
|
|
375
|
+
isError(error: unknown): error is Error;
|
|
376
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
377
|
+
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
378
|
+
stackTraceLimit: number;
|
|
379
|
+
};
|
|
380
|
+
isError(error: unknown): error is Error;
|
|
381
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
382
|
+
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
383
|
+
stackTraceLimit: number;
|
|
384
|
+
};
|
|
385
|
+
export declare class RuntimeServiceError extends RuntimeServiceError_base {
|
|
367
386
|
}
|
|
368
387
|
export {};
|
|
369
388
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/errors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/errors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAe2S,CAAC;;;;;;;;;;;;;;;;;;;;AAb/U,qBAAa,QAAS,SAAQ,aAAyC;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAaoQ,CAAC;;;;;;;;;;;;;;;;;;;;AAX/U,qBAAa,WAAY,SAAQ,gBAA+C;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAW2P,CAAC;;;;;;;;;;;;;;;;;;;;AAT/U,qBAAa,aAAc,SAAQ,kBAAmD;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBASqP,CAAC;;;;;;;;;;;;;;;;;;;;AAP/U,qBAAa,YAAa,SAAQ,iBAA2C;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAO8P,CAAC;;;;;;;;;;;;;;;;;;;;AAL/U,qBAAa,YAAa,SAAQ,iBAA2C;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAK8P,CAAC;;;;;;;;;;;;;;;;;;;;AAH/U,qBAAa,mBAAoB,SAAQ,wBAA0D;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAGwO,CAAC;;;;;;;;;;;;;;;;;;;;AAD/U,qBAAa,mBAAoB,SAAQ,wBAAgE;CAAG"}
|