also add macros for free-form error messages
This commit is contained in:
parent
a457433456
commit
fe08d9e2d2
1 changed files with 10 additions and 0 deletions
|
@ -9,6 +9,11 @@ macro_rules! err_unsup {
|
|||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! err_unsup_format {
|
||||
($($tt:tt)*) => { err_unsup!(Unsupported(format!($($tt)*))) };
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! err_inval {
|
||||
($($tt:tt)*) => {
|
||||
|
@ -27,6 +32,11 @@ macro_rules! err_ub {
|
|||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! err_ub_format {
|
||||
($($tt:tt)*) => { err_ub!(Ub(format!($($tt)*))) };
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! err_panic {
|
||||
($($tt:tt)*) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue