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