|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
com.sun.slamd.scripting.engine.ScriptException
com.sun.slamd.scripting.engine.BreakException
This class defines a special kind of script exception that may be thrown if a break instruction is encountered inside a loop. The break exception indicates that the execution of the loop should terminate and that executions should resume at the first instruction immediately after the end of the loop. It is necessary to implement this as an exception because a loop may have multiple depths of instructions and when the break is called it will be necessary to break out of all of them. To deal with the performance penalty that can be associated with exceptions (particularly, filling in the stack trace which is not even important in this case), a static singleton instance will be created that should be thrown instead of creating a new break exception every time.
| Field Summary | |
static BreakException |
BREAK
The singleton instance of this exception that should be thrown whenever a break is necessary. |
| Methods inherited from class com.sun.slamd.scripting.engine.ScriptException |
getParentException |
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final BreakException BREAK
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||