Skip to main content

get_subsystem

Function get_subsystem 

Source
pub fn get_subsystem(code: &str) -> Option<&'static str>
Expand description

Get the subsystem name for an error code, if the installed catalog knows it.

Returns None if no catalog is installed or the code is unknown.

ยงExample

use quarto_error_reporting::catalog::get_subsystem;

// With a catalog installed this returns e.g. `Some("internal")` for "Q-0-1".
let _ = get_subsystem("Q-0-1");