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.

fn fileline_note(&self, sp: Span, msg: &str)

fn fileline_help(&self, sp: Span, msg: &str)

fn span_bug(&self, sp: Span, msg: &str) -> !

fn delay_span_bug(&self, sp: Span, msg: &str)

fn span_bug_no_panic(&self, sp: Span, msg: &str)

fn span_unimpl(&self, sp: Span, msg: &str) -> !

fn fatal(&self, msg: &str) -> FatalError

fn err(&self, msg: &str)

fn warn(&self, msg: &str)

fn note(&self, msg: &str)

fn help(&self, msg: &str)

fn bug(&self, msg: &str) -> !

fn unimpl(&self, msg: &str) -> !

fn bump_err_count(&self)

fn err_count(&self) -> usize

fn has_errors(&self) -> bool

fn abort_if_errors(&self)

fn emit(&self, sp: Option<Span>, msg: &str, lvl: Level)

fn emit_with_code(&self, sp: Option<Span>, msg: &str, code: &str, lvl: Level)

fn custom_emit(&self, sp: RenderSpan, msg: &str, lvl: Level)