macro_rules! numerical_error {
($op:expr, $details:expr, $code:ident) => { ... };
($op:expr, $details:expr, $code:ident, $($key:expr => $value:expr),+ $(,)?) => { ... };
}Expand description
Create a NumericalError with optional context.
Example:
let err = numerical_error!("log", "input was negative", NumericalInstability);
let err_with_ctx = numerical_error!("log", "input was negative", NumericalInstability,
"input" => "-1.5");