UNPKG

@metamask/kernel-errors

Version:
36 lines 1.61 kB
import { BaseError } from "../BaseError.cjs"; import type { ErrorOptionsWithStack, MarshaledOcapError } from "../types.cjs"; export declare class VatNotFoundError extends BaseError { constructor(vatId: string, options?: ErrorOptionsWithStack); /** * A superstruct struct for validating marshaled {@link VatNotFoundError} instances. */ static struct: import("@metamask/superstruct").Struct<{ "@@MARSHALED_ERROR": true; code: "VAT_NOT_FOUND"; data: { vatId: string; }; message: string; stack?: string | undefined; }, { code: import("@metamask/superstruct").Struct<"VAT_NOT_FOUND", "VAT_NOT_FOUND">; data: import("@metamask/superstruct").Struct<{ vatId: string; }, { vatId: import("@metamask/superstruct").Struct<string, null>; }>; "@@MARSHALED_ERROR": import("@metamask/superstruct").Struct<true, true>; message: import("@metamask/superstruct").Struct<string, null>; stack: import("@metamask/superstruct").Struct<string | undefined, null>; }>; /** * Unmarshals a {@link MarshaledError} into a {@link VatNotFoundError}. * * @param marshaledError - The marshaled error to unmarshal. * @param unmarshalErrorOptions - The function to unmarshal the error options. * @returns The unmarshaled error. */ static unmarshal(marshaledError: MarshaledOcapError, unmarshalErrorOptions: (marshaledError: MarshaledOcapError) => ErrorOptionsWithStack): VatNotFoundError; } //# sourceMappingURL=VatNotFoundError.d.cts.map