Skip to main content

generic_warning

Macro generic_warning 

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

Create a generic warning with automatic file and line information.

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

ยงExample

use quarto_error_reporting::generic_warning;

let warning = generic_warning!("Caption found without table");
assert_eq!(warning.code, Some("Q-0-99".to_string())); // quarto-error-code-audit-ignore
assert!(warning.title.contains("Caption found without table"));
assert!(warning.title.contains(file!()));