This commit is contained in:
parent
39b0160064
commit
2347ecd201
71 changed files with 3779 additions and 1586 deletions
|
|
@ -14,16 +14,17 @@ export enum ErrorCode {
|
|||
WEBGPU_CONTEXT_CONFIGURATION_FAILED = 'webgpu-context-configuration-failed',
|
||||
WEBGPU_UNCAPTURED_ERROR = 'webgpu-uncaptured-error',
|
||||
WEBGPU_DEVICE_LOST = 'webgpu-device-lost',
|
||||
DOM_ELEMENT_MISSING = 'dom-element-missing',
|
||||
}
|
||||
|
||||
type ErrorMetadataPrimitive = string | number | boolean | null;
|
||||
export type ErrorMetadataValue =
|
||||
type ErrorMetadataValue =
|
||||
| ErrorMetadataPrimitive
|
||||
| Array<ErrorMetadataValue>
|
||||
| { [key: string]: ErrorMetadataValue };
|
||||
export type ErrorMetadata = { [key: string]: ErrorMetadataValue };
|
||||
type ErrorMetadata = { [key: string]: ErrorMetadataValue };
|
||||
|
||||
export interface RuntimeErrorOptions {
|
||||
interface RuntimeErrorOptions {
|
||||
cause?: unknown;
|
||||
details?: Record<string, unknown>;
|
||||
}
|
||||
|
|
@ -48,19 +49,19 @@ export class RuntimeError extends Error {
|
|||
}
|
||||
}
|
||||
|
||||
export interface ErrorHandlerError {
|
||||
interface ErrorHandlerError {
|
||||
severity: Severity;
|
||||
message: string;
|
||||
code?: ErrorCode | string;
|
||||
details?: ErrorMetadata;
|
||||
}
|
||||
|
||||
export interface ErrorHandlerErrorOptions {
|
||||
interface ErrorHandlerErrorOptions {
|
||||
code?: ErrorCode | string;
|
||||
details?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export interface ErrorHandlerExceptionOptions extends ErrorHandlerErrorOptions {
|
||||
interface ErrorHandlerExceptionOptions extends ErrorHandlerErrorOptions {
|
||||
fallbackMessage?: string;
|
||||
severity?: Severity;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue