Skip to content

Commit

Permalink
JACOBIN-300 Added greater consistency to error message handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
platypusguy committed Aug 19, 2023
1 parent 105d914 commit e586f2b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/jvm/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -943,9 +943,9 @@ func runFrame(fs *list.List) error {
case IREM: // 0x70 (remainder after int division, modulo)
val2 := pop(f).(int64)
if val2 == 0 {
exceptions.Throw(exceptions.ArithmeticException,
"IREM: Arithmetic Exception: divide by zero")
return errors.New("IREM: Arithmetic Exception: divide by zero")
errMsg := "IREM: Arithmetic Exception: divide by zero"
exceptions.Throw(exceptions.ArithmeticException, errMsg)
return errors.New(errMsg)
} else {
val1 := pop(f).(int64)
res := val1 % val2
Expand Down

0 comments on commit e586f2b

Please sign in to comment.