mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2025-03-04 07:18:50 -07:00
12 lines
277 B
Rust
12 lines
277 B
Rust
|
#[macro_export]
|
||
|
macro_rules! impl_into_napi_error {
|
||
|
($a:ty) => {
|
||
|
#[cfg(feature = "napi")]
|
||
|
impl Into<napi::Error> for $a {
|
||
|
fn into(self) -> napi::Error {
|
||
|
napi::Error::from_reason(self.to_string())
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
}
|