wduquette / molt

Embeddable TCL Interpreter for Rust applications
BSD 3-Clause "New" or "Revised" License
104 stars 13 forks source link

molt_throw! macro #93

Closed wduquette closed 4 years ago

wduquette commented 4 years ago

Define a new macro, similar to molt_err!, that takes the error code as its first argument, e.g.,

molt_throw!("MYERR", "My error message with data {}", data);

throws an error with code MYERR and the given error message with the data substituted in.