snes-disassembler
Version:
A Super Nintendo (SNES) ROM disassembler for 65816 assembly
53 lines • 1.3 kB
TypeScript
/**
* Error Handler Module
*
* Centralized error handling for the SNES disassembler
*/
declare enum ErrorType {
PARSING_ERROR = "PARSING_ERROR",
VALIDATION_ERROR = "VALIDATION_ERROR",
IO_ERROR = "IO_ERROR",
ANALYSIS_ERROR = "ANALYSIS_ERROR",
CONFIGURATION_ERROR = "CONFIGURATION_ERROR"
}
interface DisassemblerError {
type: ErrorType;
message: string;
context?: any;
timestamp: Date;
recoverable: boolean;
}
export declare class ErrorHandler {
private errors;
private errorCallback?;
/**
* Set error callback for custom error handling
*/
setErrorCallback(callback: (error: DisassemblerError) => void): void;
/**
* Handle an error
*/
handleError(type: ErrorType, message: string, context?: any, recoverable?: boolean): void;
/**
* Get all recorded errors
*/
getErrors(): DisassemblerError[];
/**
* Clear error history
*/
clearErrors(): void;
/**
* Get errors of a specific type
*/
getErrorsByType(type: ErrorType): DisassemblerError[];
/**
* Check if there are any fatal errors
*/
hasFatalErrors(): boolean;
/**
* Generate error summary
*/
getErrorSummary(): string;
}
export {};
//# sourceMappingURL=error-handler.d.ts.map