janhaag/PSE2011 — Issue #71: Division by zero / illegal array access in GlobalBreakpoints
Author: ratefuchs
Created: 2012-03-01 12:06:05+00:00
State: open
Labels: Interpreter

When dividing by zero in GlobalBreakpoints or doing an illegal array access, the program execution is neither continued nor paused nor stopped, and there's a stack trace in the IDE console (not in the GUI console):

Exception in thread "Thread-1" java.lang.ArithmeticException: BigInteger divide by zero
at java.math.MutableBigInteger.divide(MutableBigInteger.java:869)
at java.math.BigInteger.divide(BigInteger.java:1314)
at interpreter.Interpreter.divide(Interpreter.java:148)
at interpreter.Interpreter.visit(Interpreter.java:131)
at ast.ArithmeticExpression.accept(ArithmeticExpression.java:70)
at interpreter.Interpreter.visit(Interpreter.java:164)
at ast.LogicalExpression.accept(LogicalExpression.java:69)
at interpreter.Interpreter.visit(Interpreter.java:378)
at ast.Ensure.accept(Ensure.java:21)
at interpreter.ProgramExecution.checkBreakpoints(ProgramExecution.java:165)
at misc.ExecutionHandler.run(ExecutionHandler.java:80)
at gui.controller.MainController$1.run(MainController.java:246)

and similar stack traces for array accesses.