pub trait ReportableError: Error {
// Required method
fn get_labels(&self) -> Vec<(Location, String)>;
// Provided method
fn get_message(&self) -> String { ... }
}
Expand description
A dynamic error type that can hold specific error messages and the location where the error happened.
Required Methods§
Sourcefn get_labels(&self) -> Vec<(Location, String)>
fn get_labels(&self) -> Vec<(Location, String)>
Label is used for indicating error with the specific position for `ariadne``. One error may have multiple labels, because the reason of the error may be caused by the mismatch of the properties in 2 or more different locations in the source (such as the type mismatch).
Provided Methods§
Sourcefn get_message(&self) -> String
fn get_message(&self) -> String
message is used for reporting verbose message for `ariadne``.
Trait Implementations§
Source§impl PartialEq for dyn ReportableError + '_
ReportableError implements `PartialEq`` mostly for testing purpose.
impl PartialEq for dyn ReportableError + '_
ReportableError implements `PartialEq`` mostly for testing purpose.