This code ICEs when the function in the crate x, marked with #[plugin_registrar] panics:
/// Crate x
#[plugin_registrar]
pub fn plugin_registrar(reg: &mut Registry) {
panic!()
}
/// Another crate
#[phase(plugin)] extern crate x;
This code ICEs when the macro expansion fails
/// Crate x
#[plugin_registrar]
pub fn plugin_registrar(reg: &mut Registry) {
reg.register_macro("wrong", expand);
}
fn expand(cx: &mut ExtCtxt, sp: codemap::Span, tts: &[ast::TokenTree]) -> Box<MacResult + 'static> {
panic!()
}
/// Another crate
wrong!()
It would be nice to tell the user that the plugin registrar has panicked or that the macro expansion has panicked, respectively.
If there is a simple way to "catch" a panic! I would like to hear about it and fix this.
This code ICEs when the function in the crate
x, marked with#[plugin_registrar]panics:This code ICEs when the macro expansion fails
It would be nice to tell the user that the plugin registrar has panicked or that the macro expansion has panicked, respectively.
If there is a simple way to "catch" a
panic!I would like to hear about it and fix this.