Skip to content

Commit

Permalink
clean up dbg print in move error reporting (#761)
Browse files Browse the repository at this point in the history
  • Loading branch information
0o-de-lally authored Oct 14, 2021
1 parent 685e228 commit 9b9e5eb
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions language/diem-vm/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ pub fn convert_prologue_error(
) -> Result<(), VMStatus> {
let status = error.into_vm_status();

// This is needed for UNEXPECTED_ERROR_FROM_KNOWN_MOVE_FUNCTION failures
dbg!("Error", &status); /////// 0L /////////

Err(match status {
VMStatus::Executed => VMStatus::Executed,
VMStatus::MoveAbort(location, code)
Expand Down Expand Up @@ -100,6 +97,8 @@ pub fn convert_prologue_error(
"[diem_vm] Unexpected prologue Move abort: {:?}::{:?} (Category: {:?} Reason: {:?})",
location, code, category, reason,
);

// TODO: Improve error reporting for devs https://github.com/OLSF/libra/issues/760
return Err(VMStatus::Error(
StatusCode::UNEXPECTED_ERROR_FROM_KNOWN_MOVE_FUNCTION,
));
Expand Down Expand Up @@ -127,9 +126,6 @@ pub fn convert_epilogue_error(
) -> Result<(), VMStatus> {
let status = error.into_vm_status();

// This is needed for UNEXPECTED_ERROR_FROM_KNOWN_MOVE_FUNCTION failures
dbg!("Error", &status); /////// 0L /////////

Err(match status {
VMStatus::Executed => VMStatus::Executed,
VMStatus::MoveAbort(location, code)
Expand Down Expand Up @@ -179,9 +175,6 @@ pub fn expect_only_successful_execution(
) -> Result<(), VMStatus> {
let status = error.into_vm_status();

// This is needed for UNEXPECTED_ERROR_FROM_KNOWN_MOVE_FUNCTION failures
dbg!("Error", &status); /////// 0L /////////

Err(match status {
VMStatus::Executed => VMStatus::Executed,

Expand All @@ -193,6 +186,8 @@ pub fn expect_only_successful_execution(
function_name,
status,
);
// TODO: Improve error reporting for devs https://github.com/OLSF/libra/issues/760

VMStatus::Error(StatusCode::UNEXPECTED_ERROR_FROM_KNOWN_MOVE_FUNCTION)
}
})
Expand Down

0 comments on commit 9b9e5eb

Please sign in to comment.