mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-12 08:31:21 +00:00
Debugging LLVM trap code WIP
This commit is contained in:
@ -296,7 +296,7 @@ impl std::fmt::Display for RuntimeError {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
match self {
|
||||
// TODO: update invoke error formatting
|
||||
RuntimeError::InvokeError(_) => write!(f, "Error when calling invoke"),
|
||||
RuntimeError::InvokeError(ie) => write!(f, "Error when calling invoke: {:?}", ie),
|
||||
RuntimeError::Metering(_) => write!(f, "unknown metering error type"),
|
||||
RuntimeError::InstanceImage(_) => write!(
|
||||
f,
|
||||
|
@ -281,7 +281,7 @@ extern "C" fn signal_trap_handler(
|
||||
let mut should_unwind = false;
|
||||
let mut unwind_result: Option<Box<RuntimeError>> = None;
|
||||
let get_unwind_result = |uw_result: Option<Box<RuntimeError>>| -> Box<RuntimeError> {
|
||||
uw_result
|
||||
dbg!(uw_result)
|
||||
.unwrap_or_else(|| Box::new(RuntimeError::InvokeError(InvokeError::FailedWithNoError)))
|
||||
};
|
||||
|
||||
|
@ -602,9 +602,9 @@ pub(crate) fn call_func_with_index_inner(
|
||||
if success {
|
||||
Ok(())
|
||||
} else {
|
||||
let error: RuntimeError = error_out
|
||||
.map(Into::into)
|
||||
.unwrap_or_else(|| RuntimeError::InvokeError(InvokeError::FailedWithNoError));
|
||||
let error: RuntimeError = dbg!(error_out)
|
||||
.map_or_else(|| RuntimeError::InvokeError(InvokeError::FailedWithNoError), Into::into);
|
||||
dbg!(&error);
|
||||
Err(error.into())
|
||||
}
|
||||
};
|
||||
|
@ -590,7 +590,7 @@ macro_rules! impl_traits {
|
||||
) {
|
||||
Ok(Rets::from_ret_array(rets))
|
||||
} else {
|
||||
Err(error_out.map_or_else(|| RuntimeError::InvokeError(InvokeError::FailedWithNoError), Into::into))
|
||||
Err(dbg!(error_out).map_or_else(|| RuntimeError::InvokeError(InvokeError::FailedWithNoError), Into::into))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user