Macro janetrs::jpanic [−][src]
macro_rules! jpanic { () => { ... }; ($msg:expr $(,)?) => { ... }; ($msg:expr, $($arg:tt)+) => { ... }; }
Expand description
Causes a panic in the Janet side. Diferently of the Rust panic!
macro, this macro
does not terminate the current thread. Instead, it sends a error signal with the
passed message where the Janet runtime takes care to properly exit.
Examples
ⓘ
use janetrs::jpanic; jpanic!(); jpanic!("this is a terrible mistake!"); jpanic!(4); // In simple cases you can use any type that Janet implements From trait jpanic!("this is a {} {message}", "fancy", message = "message");