Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-debug-dev] throw statement in evaluations



I implemented the throw statement in the evaluation engine. It allows to
evaluate a snippet like "throw new Exception();". It will create the
exception, stop the execution of the thread and throw the exception as if
the snippet was in the code of the current method.
It works fine but I don't like the fact that an evaluation has a direct
effect on a thread, that will create some interresting cases if it use in
expression condition or watch expression.
An alternative is to create a 'throw' action (like evaluate, inspect, ...
actions) which will throw an exception created by a snippet evaluation.
This allow use more control on when and in which condition the throw can be
performed.

May be the current implementation is OK, but it seems to me that it allows
to do more than what we need.

See bug 39824 for more details.

Any comment is welcome (almost).

Luc



Back to the top