UNPKG

browser-debugger-cli

Version:

DevTools telemetry in your terminal. For humans and agents. Direct WebSocket to Chrome's debugging port.

28 lines 689 B
/** * Error handling utilities. * * Pure utility functions for error message extraction. */ /** * Extract error message from unknown error type. * * Safely extracts error messages from various error types: * - Error instances → error.message * - Unknown types → String(error) * * Useful for error handling when error type is unknown. * * @param error - Error of unknown type * @returns Error message string * * @example * ```typescript * try { * await someOperation(); * } catch (error) { * console.error(`Failed: ${getErrorMessage(error)}`); * } * ``` */ export declare function getErrorMessage(error: unknown): string; //# sourceMappingURL=errors.d.ts.map