mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-25 22:51:32 +00:00
Improve error message on exception.
This commit is contained in:
@ -210,7 +210,7 @@ impl std::fmt::Display for RuntimeError {
|
|||||||
} else if let Some(s) = data.downcast_ref::<&str>() {
|
} else if let Some(s) = data.downcast_ref::<&str>() {
|
||||||
write!(f, "\"{}\"", s)
|
write!(f, "\"{}\"", s)
|
||||||
} else if let Some(exc_code) = data.downcast_ref::<ExceptionCode>() {
|
} else if let Some(exc_code) = data.downcast_ref::<ExceptionCode>() {
|
||||||
write!(f, "\"{:?}\"", exc_code)
|
write!(f, "Caught exception of type \"{:?}\".", exc_code)
|
||||||
} else {
|
} else {
|
||||||
write!(f, "unknown error")
|
write!(f, "unknown error")
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user