diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -2,5 +2,18 @@ pub mod dsb; pub mod types; -mod error; +pub(crate) mod error; pub use error::Error; + +/// create a new dsb_parse error +#[macro_export] +macro_rules! err_dsb_parse { + ($fmt:expr) => ({ + $crate::error::Error::DsbParse{ msg: ($fmt). + to_string() } + }); + ($fmt:expr, $($arg:tt)*) => ({ + $crate::error::Error::DsbParse{ msg: format! + ($fmt, $($arg)*) } + }); +} |