wduquette / molt

Embeddable TCL Interpreter for Rust applications
BSD 3-Clause "New" or "Revised" License
103 stars 12 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.