import type { CodingRuntimeErrorCode, CodingRuntimePublicError, } from './contracts'; export class CodingRuntimeContractError extends Error { readonly publicError: CodingRuntimePublicError; constructor(code: CodingRuntimeErrorCode, message: string, recoverable: boolean) { super(message); this.name = 'CodingRuntimeContractError'; this.publicError = { code, message, recoverable }; } }