pub enum FrontendError {
Parse(String),
UnsupportedVersion(String),
ImportError {
path: String,
reason: String,
},
ContractNotFound(String),
}Expand description
Errors emitted by the frontend while parsing Solidity code.
Variants§
Parse(String)
Parsing failed; the contained message aggregates all diagnostics.
UnsupportedVersion(String)
Invalid Solidity version pragma
ImportError
Import resolution failed
ContractNotFound(String)
Contract not found in source
Implementations§
Source§impl FrontendError
impl FrontendError
Sourcepub fn parse_at(line: usize, column: usize, message: impl Into<String>) -> Self
pub fn parse_at(line: usize, column: usize, message: impl Into<String>) -> Self
Create a parse error with location info
Sourcepub fn import_error(path: impl Into<String>, reason: impl Into<String>) -> Self
pub fn import_error(path: impl Into<String>, reason: impl Into<String>) -> Self
Create an import error
Sourcepub fn is_recoverable(&self) -> bool
pub fn is_recoverable(&self) -> bool
Check if this is a recoverable error
Trait Implementations§
Source§impl Debug for FrontendError
impl Debug for FrontendError
Source§impl Display for FrontendError
impl Display for FrontendError
Source§impl Error for FrontendError
impl Error for FrontendError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<FrontendError> for SolidityError
impl From<FrontendError> for SolidityError
Source§fn from(source: FrontendError) -> Self
fn from(source: FrontendError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for FrontendError
impl RefUnwindSafe for FrontendError
impl Send for FrontendError
impl Sync for FrontendError
impl Unpin for FrontendError
impl UnwindSafe for FrontendError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more