Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Karim Taam <[email protected]>
  • Loading branch information
matkt committed Jan 20, 2025
1 parent 2d38815 commit a284eca
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,19 @@ private static FlatTrace.Context handleHalt(
traceFrameBuilder = currentContext.getBuilder();
}
traceFrameBuilder.error(
traceFrame.getExceptionalHaltReason().map(ExceptionalHaltReason::getDescription));
traceFrame
.getExceptionalHaltReason()
.map(
exceptionalHaltReason -> {
if (exceptionalHaltReason
.name()
.equals(ExceptionalHaltReason.INVALID_OPERATION.name())) {
return ExceptionalHaltReason.INVALID_OPERATION.getDescription();
} else {
return exceptionalHaltReason.getDescription();
}
}));

if (currentContext != null) {
final Action.Builder actionBuilder = traceFrameBuilder.getActionBuilder();
actionBuilder.value(Quantity.create(traceFrame.getValue()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ public String name() {
public String getDescription() {
return "invalid opcode: 0x%02x".formatted(opcode);
}
;

@Override
public String toString() {
return name();
}
});
}
}

0 comments on commit a284eca

Please sign in to comment.