mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-24 14:11:32 +00:00
Implement Error for CompilerError (#181)
This commit is contained in:
@ -28,6 +28,19 @@ impl PartialEq for CompileError {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl std::fmt::Display for CompileError {
|
||||||
|
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||||
|
match self {
|
||||||
|
CompileError::InternalError { msg } => {
|
||||||
|
write!(f, "Internal compiler error: \"{}\"", msg)
|
||||||
|
}
|
||||||
|
CompileError::ValidationError { msg } => write!(f, "Validation error \"{}\"", msg),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl std::error::Error for CompileError {}
|
||||||
|
|
||||||
/// This is returned when the runtime is unable to
|
/// This is returned when the runtime is unable to
|
||||||
/// correctly link the module with the provided imports.
|
/// correctly link the module with the provided imports.
|
||||||
///
|
///
|
||||||
|
Reference in New Issue
Block a user