gather-ts
Version:
A powerful code analysis and packaging tool designed for creating AI-friendly code representations for javascript and typescript projects.
22 lines (21 loc) • 965 B
TypeScript
import { BaseService } from "@/types/services";
import { IErrorHandler, IErrorProcessingStrategy, IErrorHandlerDeps, IErrorHandlerOptions, IErrorOperationOptions } from "../interfaces/IErrorHandler";
export declare class ErrorHandler extends BaseService implements IErrorHandler {
private readonly deps;
private readonly processingStrategies;
private readonly debug;
private readonly logToConsole;
private readonly logToFile;
private readonly logFilePath?;
private readonly rethrow;
constructor(deps: IErrorHandlerDeps, options?: IErrorHandlerOptions);
initialize(): Promise<void>;
cleanup(): void;
private logDebug;
registerStrategy(strategy: IErrorProcessingStrategy): void;
handle(error: Error, options?: IErrorOperationOptions): void;
handleBatch(errors: Error[]): void;
createErrorBoundary(fn: () => Promise<void>): Promise<void>;
private createConsoleStrategy;
private createFileStrategy;
}