@notjustcoders/ioc-arise
Version:
Arise type-safe IoC containers from your code. Zero overhead, zero coupling.
108 lines • 3.34 kB
TypeScript
/**
* Error codes for IoC Arise CLI
*/
export declare enum IoCErrorCode {
CONFIG_INVALID = "IOC_1000",
CONFIG_FILE_NOT_FOUND = "IOC_1001",
CONFIG_PARSE_ERROR = "IOC_1002",
CONFIG_VALIDATION_ERROR = "IOC_1003",
SOURCE_DIR_NOT_FOUND = "IOC_1100",
SOURCE_DIR_NOT_ACCESSIBLE = "IOC_1101",
SOURCE_DIR_EMPTY = "IOC_1102",
ANALYSIS_FAILED = "IOC_1200",
NO_CLASSES_FOUND = "IOC_1201",
CIRCULAR_DEPENDENCY = "IOC_1202",
DUPLICATE_INTERFACE_IMPLEMENTATION = "IOC_1203",
DUPLICATE_ABSTRACT_CLASS_EXTENSION = "IOC_1204",
INVALID_INTERFACE_PATTERN = "IOC_1205",
GENERATION_FAILED = "IOC_1300",
OUTPUT_FILE_ERROR = "IOC_1301",
TEMPLATE_ERROR = "IOC_1302",
MODULE_CONFIG_INVALID = "IOC_1400",
MODULE_PATTERN_INVALID = "IOC_1401",
MODULE_DUPLICATE_PATTERN = "IOC_1402",
FILE_NOT_FOUND = "IOC_1500",
FILE_READ_ERROR = "IOC_1501",
FILE_WRITE_ERROR = "IOC_1502",
PERMISSION_DENIED = "IOC_1503",
VALIDATION_ERROR = "IOC_1600",
SCHEMA_VALIDATION_ERROR = "IOC_1601",
TYPE_VALIDATION_ERROR = "IOC_1602",
RUNTIME_ERROR = "IOC_1700",
UNEXPECTED_ERROR = "IOC_1701",
INITIALIZATION_ERROR = "IOC_1702",
RENDERER_NOT_FOUND = "IOC_1800",
RENDERER_ERROR = "IOC_1801"
}
/**
* Severity levels for errors
*/
export declare enum ErrorSeverity {
LOW = "low",
MEDIUM = "medium",
HIGH = "high",
CRITICAL = "critical"
}
/**
* Additional context for errors
*/
export interface ErrorContext {
filePath?: string;
lineNumber?: number;
columnNumber?: number;
className?: string;
interfaceName?: string;
moduleName?: string;
configProperty?: string;
[key: string]: any;
}
/**
* Base IoC error class with custom error codes
*/
export declare class IoCError extends Error {
readonly code: IoCErrorCode;
readonly severity: ErrorSeverity;
readonly context?: ErrorContext;
readonly timestamp: Date;
readonly suggestions?: string[];
constructor(code: IoCErrorCode, message: string, severity?: ErrorSeverity, context?: ErrorContext, suggestions?: string[]);
/**
* Get a formatted error message with code and context
*/
getFormattedMessage(): string;
/**
* Convert error to JSON for logging or API responses
*/
toJSON(): object;
}
/**
* Configuration-specific error
*/
export declare class ConfigError extends IoCError {
constructor(code: IoCErrorCode, message: string, context?: ErrorContext, suggestions?: string[]);
}
/**
* Analysis-specific error
*/
export declare class AnalysisError extends IoCError {
constructor(code: IoCErrorCode, message: string, context?: ErrorContext, suggestions?: string[]);
}
/**
* Generation-specific error
*/
export declare class GenerationError extends IoCError {
constructor(code: IoCErrorCode, message: string, context?: ErrorContext, suggestions?: string[]);
}
/**
* Validation-specific error
*/
export declare class ValidationError extends IoCError {
constructor(code: IoCErrorCode, message: string, context?: ErrorContext, suggestions?: string[]);
}
/**
* File system-specific error
*/
export declare class FileSystemError extends IoCError {
constructor(code: IoCErrorCode, message: string, context?: ErrorContext, suggestions?: string[]);
}
//# sourceMappingURL=IoCError.d.ts.map