mimium_lang::utils::error

Trait ReportableError

Source
pub trait ReportableError: Error {
    // Required method
    fn get_span(&self) -> Range<usize> ;

    // Provided methods
    fn get_message(&self, _color: Color) -> String { ... }
    fn get_label(&self, _color: Color) -> String { ... }
}

Required Methods§

Source

fn get_span(&self) -> Range<usize>

message is used for reporting verbose message for ariadne.

Provided Methods§

Source

fn get_message(&self, _color: Color) -> String

Source

fn get_label(&self, _color: Color) -> String

label is used for indicating error with the specific position for ariadne.

Implementors§

Source§

impl ReportableError for mimium_lang::compiler::mirgen::convert_pronoun::Error

Source§

impl ReportableError for CompileError

Source§

impl ReportableError for mimium_lang::compiler::Error

Source§

impl ReportableError for mimium_lang::compiler::typing::Error

Source§

impl ReportableError for mimium_lang::runtime::Error

Source§

impl ReportableError for ReportableErrorDyn