pub fn classify_error(err: &Error) -> (&'static str, &'static str)
Classify an error into (stage, error_kind) for structured error reporting.