Exception Type | Description |
ArithmeticException | Illegal arithmetic operations. Example: Attempt to divide by 0, call to the ceil() method on NaN, call to the exponent() method on infinity, specifying NaN as all or part of an ordered key, call to the rand() method on an illegal float value such as Infinity. |
CastException | Thrown when casting an any value to a type which does not match the type of the any value. Example: any a := 1; string s := <string> a; |
DefaultContextException | Spawning, sending or enqueuing to a context and specifying a context variable that has been declared but the context has not yet been created. Example: monitor m { context c; action onload() { send A() to c; } } |
IndexOutOfBoundsException | Invalid index in a sequence or string operation. Example: sequence.insert(-1, x) |
IllegalArgumentException | Illegal argument value in an expression. Example: "".split() |
IllegalStateException | Calling an action when it is illegal to do so. Example: A spawn statement in ondie() or onunload(). |
MemoryAllocationException | Unable to fulfill memory allocation request. Example: An invalid size is passed to the sequence setCapacity() method. |
NullPointerException | Attempt to call an action variable when that variable has not been initialized, or to call getOrThrow on an optional instance that is empty. Example: event E { action<string> x; } monitor m { E e; action onload() { e.x("This will fail!"); } } |
OtherInternalException | An internal error occurred. Example: parse("two") on an integer. |
ParseException | Error that occurs while parsing. |
PluginException | An exception thrown by an EPL plug-in. See the information that follows this table. |
StackOverflowException | Attempt to use more space than is available on the stack. |
UnmatchedTypeException | Thrown by the switch statement if none of the case clauses match the type of the any value and there is no default clause (or the any is an empty value). See also Handling any values of different types with the switch
statement. Example: any a:=any(); switch(a) { case string : { print "string"; } case integer : { print "int"; } } |