UNPKG

@eventmsg/core

Version:

EventMsgV3 TypeScript library - Core protocol implementation with transport abstraction

31 lines 974 B
//#region src/errors/event-msg-error.d.ts /** * Base error class for all EventMsg-related errors. * Provides consistent error handling with context and solutions. */ declare class EventMsgError extends Error { /** Error code for programmatic handling */ code: string; /** Additional context about the error */ readonly context: Record<string, unknown> | undefined; /** Suggested solutions for the error */ readonly solutions: string[]; /** Original error that caused this error */ readonly cause: Error | undefined; constructor(message: string, code: string, options?: { context?: Record<string, unknown>; solutions?: string[]; cause?: Error; }); /** * Get a detailed error message including context and solutions */ getDetailedMessage(): string; /** * Convert error to JSON for logging/serialization */ toJSON(): Record<string, unknown>; } //#endregion export { EventMsgError }; //# sourceMappingURL=event-msg-error.d.cts.map