@dxos/errors 0.8.4-main.84f28bd → 0.8.4-main.937b3ca

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.
@@ -1,123 +1,388 @@
1
1
  import { BaseError } from './base';
2
- declare const TimeoutError_base: {
3
- new (message: string, options?: import("./base").BaseErrorOptions): {
4
- "__#1@#code": string;
5
- "__#1@#context": Record<string, unknown>;
6
- readonly name: string;
7
- readonly code: string;
8
- readonly context: Record<string, unknown>;
9
- 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";
10
8
  stack?: string;
11
9
  cause?: unknown;
12
10
  };
13
- code: string;
11
+ name: "ApiError";
14
12
  is(error: unknown): error is BaseError;
15
- extend(code: string): /*elided*/ any;
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";
20
+ stack?: string;
21
+ cause?: unknown;
22
+ };
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;
29
+ stack?: string;
30
+ cause?: unknown;
31
+ };
32
+ name: Name;
33
+ is(error: unknown): error is BaseError;
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;
41
+ stack?: string;
42
+ cause?: unknown;
43
+ };
44
+ extend<Name extends string = string>(name: Name, message?: string): /*elided*/ any;
45
+ isError(error: unknown): error is Error;
46
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
47
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
48
+ stackTraceLimit: number;
49
+ };
50
+ isError(error: unknown): error is Error;
16
51
  captureStackTrace(targetObject: object, constructorOpt?: Function): void;
17
52
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
18
53
  stackTraceLimit: number;
19
54
  };
20
- export declare class TimeoutError extends TimeoutError_base {
55
+ export declare class ApiError extends ApiError_base {
21
56
  }
22
- declare const AbortedError_base: {
23
- new (message: string, options?: import("./base").BaseErrorOptions): {
24
- "__#1@#code": string;
25
- "__#1@#context": Record<string, unknown>;
26
- readonly name: string;
27
- readonly code: string;
28
- readonly context: Record<string, unknown>;
29
- 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";
30
63
  stack?: string;
31
64
  cause?: unknown;
32
65
  };
33
- code: string;
66
+ name: "SystemError";
34
67
  is(error: unknown): error is BaseError;
35
- extend(code: string): /*elided*/ any;
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";
75
+ stack?: string;
76
+ cause?: unknown;
77
+ };
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;
84
+ stack?: string;
85
+ cause?: unknown;
86
+ };
87
+ name: Name;
88
+ is(error: unknown): error is BaseError;
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;
96
+ stack?: string;
97
+ cause?: unknown;
98
+ };
99
+ extend<Name extends string = string>(name: Name, message?: string): /*elided*/ any;
100
+ isError(error: unknown): error is Error;
101
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
102
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
103
+ stackTraceLimit: number;
104
+ };
105
+ isError(error: unknown): error is Error;
36
106
  captureStackTrace(targetObject: object, constructorOpt?: Function): void;
37
107
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
38
108
  stackTraceLimit: number;
39
109
  };
40
- export declare class AbortedError extends AbortedError_base {
110
+ export declare class SystemError extends SystemError_base {
41
111
  }
42
- declare const UnimplementedError_base: {
43
- new (message: string, options?: import("./base").BaseErrorOptions): {
44
- "__#1@#code": string;
45
- "__#1@#context": Record<string, unknown>;
46
- readonly name: string;
47
- readonly code: string;
48
- readonly context: Record<string, unknown>;
49
- 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";
50
118
  stack?: string;
51
119
  cause?: unknown;
52
120
  };
53
- code: string;
121
+ name: "InternalError";
54
122
  is(error: unknown): error is BaseError;
55
- extend(code: string): /*elided*/ any;
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";
130
+ stack?: string;
131
+ cause?: unknown;
132
+ };
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;
139
+ stack?: string;
140
+ cause?: unknown;
141
+ };
142
+ name: Name;
143
+ is(error: unknown): error is BaseError;
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;
151
+ stack?: string;
152
+ cause?: unknown;
153
+ };
154
+ extend<Name extends string = string>(name: Name, message?: string): /*elided*/ any;
155
+ isError(error: unknown): error is Error;
156
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
157
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
158
+ stackTraceLimit: number;
159
+ };
160
+ isError(error: unknown): error is Error;
56
161
  captureStackTrace(targetObject: object, constructorOpt?: Function): void;
57
162
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
58
163
  stackTraceLimit: number;
59
164
  };
60
- export declare class UnimplementedError extends UnimplementedError_base {
165
+ export declare class InternalError extends InternalError_base {
61
166
  }
62
- declare const ApiError_base: {
63
- new (message: string, options?: import("./base").BaseErrorOptions): {
64
- "__#1@#code": string;
65
- "__#1@#context": Record<string, unknown>;
66
- readonly name: string;
67
- readonly code: string;
68
- readonly context: Record<string, unknown>;
69
- 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";
70
173
  stack?: string;
71
174
  cause?: unknown;
72
175
  };
73
- code: string;
176
+ name: "TimeoutError";
74
177
  is(error: unknown): error is BaseError;
75
- extend(code: string): /*elided*/ any;
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";
185
+ stack?: string;
186
+ cause?: unknown;
187
+ };
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;
194
+ stack?: string;
195
+ cause?: unknown;
196
+ };
197
+ name: Name;
198
+ is(error: unknown): error is BaseError;
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;
206
+ stack?: string;
207
+ cause?: unknown;
208
+ };
209
+ extend<Name extends string = string>(name: Name, message?: string): /*elided*/ any;
210
+ isError(error: unknown): error is Error;
211
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
212
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
213
+ stackTraceLimit: number;
214
+ };
215
+ isError(error: unknown): error is Error;
76
216
  captureStackTrace(targetObject: object, constructorOpt?: Function): void;
77
217
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
78
218
  stackTraceLimit: number;
79
219
  };
80
- export declare class ApiError extends ApiError_base {
220
+ export declare class TimeoutError extends TimeoutError_base {
81
221
  }
82
- declare const SystemError_base: {
83
- new (message: string, options?: import("./base").BaseErrorOptions): {
84
- "__#1@#code": string;
85
- "__#1@#context": Record<string, unknown>;
86
- readonly name: string;
87
- readonly code: string;
88
- readonly context: Record<string, unknown>;
89
- 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";
90
228
  stack?: string;
91
229
  cause?: unknown;
92
230
  };
93
- code: string;
231
+ name: "AbortedError";
94
232
  is(error: unknown): error is BaseError;
95
- extend(code: string): /*elided*/ any;
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";
240
+ stack?: string;
241
+ cause?: unknown;
242
+ };
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;
249
+ stack?: string;
250
+ cause?: unknown;
251
+ };
252
+ name: Name;
253
+ is(error: unknown): error is BaseError;
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;
261
+ stack?: string;
262
+ cause?: unknown;
263
+ };
264
+ extend<Name extends string = string>(name: Name, message?: string): /*elided*/ any;
265
+ isError(error: unknown): error is Error;
266
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
267
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
268
+ stackTraceLimit: number;
269
+ };
270
+ isError(error: unknown): error is Error;
96
271
  captureStackTrace(targetObject: object, constructorOpt?: Function): void;
97
272
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
98
273
  stackTraceLimit: number;
99
274
  };
100
- export declare class SystemError extends SystemError_base {
275
+ export declare class AbortedError extends AbortedError_base {
101
276
  }
102
- declare const InternalError_base: {
103
- new (message: string, options?: import("./base").BaseErrorOptions): {
104
- "__#1@#code": string;
105
- "__#1@#context": Record<string, unknown>;
106
- readonly name: string;
107
- readonly code: string;
108
- readonly context: Record<string, unknown>;
109
- 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";
283
+ stack?: string;
284
+ cause?: unknown;
285
+ };
286
+ name: "NotImplementedError";
287
+ is(error: unknown): error is BaseError;
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";
110
295
  stack?: string;
111
296
  cause?: unknown;
112
297
  };
113
- code: 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;
304
+ stack?: string;
305
+ cause?: unknown;
306
+ };
307
+ name: Name;
308
+ is(error: unknown): error is BaseError;
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;
316
+ stack?: string;
317
+ cause?: unknown;
318
+ };
319
+ extend<Name extends string = string>(name: Name, message?: string): /*elided*/ any;
320
+ isError(error: unknown): error is Error;
321
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
322
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
323
+ stackTraceLimit: number;
324
+ };
325
+ isError(error: unknown): error is Error;
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
+ 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";
114
342
  is(error: unknown): error is BaseError;
115
- extend(code: string): /*elided*/ any;
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;
116
381
  captureStackTrace(targetObject: object, constructorOpt?: Function): void;
117
382
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
118
383
  stackTraceLimit: number;
119
384
  };
120
- export declare class InternalError extends InternalError_base {
385
+ export declare class RuntimeServiceError extends RuntimeServiceError_base {
121
386
  }
122
387
  export {};
123
388
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../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