Skip to main content

Module error_ext

Module error_ext 

Source
Expand description

Binary-owned presentation extensions for SubXError.

The SubXError taxonomy itself lives in subx_core::error and ships with the library half of the split (subx-core): category(), machine_code() and hint() are inherent methods there because machine-readable front ends (e.g. the Tauri GUI) consume them directly.

Process exit codes and multi-line terminal prose with Hint: lines, however, are properties of running the subx-cli binary — a library consumer embeds SubXError in its own presentation layer and has neither a process exit code nor a terminal. Those two operations therefore live here, as an extension trait owned by the binary:

Code under src/core/ and src/services/ SHALL NOT import this trait or call either method; core code that needs a rendered message uses Display (to_string()), optionally combined with hint().

Traits§

SubXErrorExt
Presentation-layer extensions to SubXError owned by the binary.