copybook-error
Error types and taxonomy for copybook-rs.
This crate provides a comprehensive error taxonomy with stable error codes for all failure modes in the copybook processing system.
61 error codes across 10 families covering parse, schema, data, encoding, record, character set, file, infrastructure, audit, and Arrow/writer errors.
Public API
Error- Main error type with code, message, and optional contextErrorCode- Stable error codes for programmatic error handlingErrorContext- Detailed error context (record index, field path, byte offset, line number)Result<T>- Result type aliaserror!macro - Convenience macro for creating errors
Error Code Taxonomy
The error codes follow the pattern CBK[Category][Number]_[Description]:
CBKP*- Parse errors during copybook analysisCBKS*- Schema validation and ODO processingCBKR*- Record format and RDW processingCBKC*- Character conversion and encodingCBKD*- Data decoding and field validationCBKE*- Encoding and JSON serializationCBKF*- File format and structure validationCBKI*- Iterator and infrastructure state validationCBKA*- Performance and compliance audit operationsCBKW*- Arrow and Parquet conversion errors