Struct syntex_syntax::errors::Handler
[−]
[src]
pub struct Handler { pub can_emit_warnings: bool, // some fields omitted }
A handler deals with errors; certain errors (fatal, bug, unimpl) may cause immediate exit, others log errors for later reporting.
Fields
can_emit_warnings: bool
Methods
impl Handler
[src]
fn new(color_config: ColorConfig, registry: Option<Registry>, can_emit_warnings: bool, treat_err_as_bug: bool, cm: Rc<CodeMap>) -> Handler
fn with_emitter(can_emit_warnings: bool, treat_err_as_bug: bool, e: Box<Emitter>) -> Handler
fn span_fatal(&self, sp: Span, msg: &str) -> FatalError
fn span_fatal_with_code(&self, sp: Span, msg: &str, code: &str) -> FatalError
fn span_err(&self, sp: Span, msg: &str)
fn span_err_with_code(&self, sp: Span, msg: &str, code: &str)
fn span_warn(&self, sp: Span, msg: &str)
fn span_warn_with_code(&self, sp: Span, msg: &str, code: &str)
fn span_note(&self, sp: Span, msg: &str)
fn span_end_note(&self, sp: Span, msg: &str)
fn span_help(&self, sp: Span, msg: &str)
fn span_suggestion(&self, sp: Span, msg: &str, suggestion: String)
Prints out a message with a suggested edit of the code.
See diagnostic::RenderSpan::Suggestion
for more information.