Module error_codes

Module error_codes 

Source
Expand description

Magellan-specific error codes

Error codes follow the pattern: MAG-{CATEGORY}-{3-digit number}

Categories (1-3 uppercase letters):

  • REF: Reference-related errors (symbol lookup, span resolution)
  • QRY: Query-related errors (invalid queries, file not found)
  • IO: I/O-related errors (file access, permissions)
  • V: Validation errors (checksum mismatch, invalid spans)

Each error code is stable and should not be reused.

Constantsยง

ERROR_CODE_DOCUMENTATION
Error code documentation
MAG_IO_001_FILE_NOT_FOUND
File not found on filesystem
MAG_IO_002_PERMISSION_DENIED
Permission denied
MAG_IO_003_INVALID_PATH
Invalid file path
MAG_QRY_001_INVALID_QUERY
Invalid query syntax
MAG_QRY_002_FILE_NOT_FOUND
File not found in database
MAG_QRY_003_INVALID_PARAMS
Invalid query parameters
MAG_REF_001_SYMBOL_NOT_FOUND
Symbol not found
MAG_REF_002_AMBIGUOUS_SYMBOL
Ambiguous symbol (multiple matches)
MAG_REF_003_INVALID_SPAN
Invalid span (start > end, out of bounds)
MAG_V_001_CHECKSUM_MISMATCH
Checksum mismatch
MAG_V_002_SPAN_INVALID
Span validation failed
MAG_V_003_DB_CORRUPTION
Database corruption detected