#[macro_export]
macro_rules! err_create {
($t:expr) => {
PaymentError {
inner: ErrorBag::from($t),
msg: None,
file: file!(),
line: line!(),
column: column!(),
}
};
}
#[macro_export]
macro_rules! err_custom_create {
($($t:tt)*) => {
PaymentError {
inner: ErrorBag::from(CustomError::from_owned_string(format!($($t)*))),
msg: None,
file: file!(),
line: line!(),
column: column!(),
}
};
}
#[macro_export]
macro_rules! err_from {
() => {
|e| PaymentError {
inner: ErrorBag::from(e),
msg: None,
file: file!(),
line: line!(),
column: column!(),
}
};
}
#[macro_export]
macro_rules! err_from_msg {
($($t:tt)*) => {{
|e| PaymentError {
inner: ErrorBag::from(e),
msg: Some(format!($($t)*)),
file: file!(),
line: line!(),
column: column!(),
}
}};
}