Skip to main content

generic_error

Macro generic_error 

Source
macro_rules! generic_error {
    ($message:expr) => { ... };
}
Expand description

Create a generic error with automatic file and line information.

This macro is for migration purposes - it creates an error with code Q-0-99 (quarto-error-code-audit-ignore) and automatically includes the file and line number where the error was created.

ยงExample

use quarto_error_reporting::generic_error;

let error = generic_error!("Found unexpected attribute");
assert_eq!(error.code, Some("Q-0-99".to_string())); // quarto-error-code-audit-ignore
assert!(error.title.contains("Found unexpected attribute"));
assert!(error.title.contains(file!()));