Apama 10.3 | Apama Documentation | Developing Apama Applications | Developing Apama Applications in EPL | Testing and Tuning EPL monitors | Handling runtime errors
Handling runtime errors
What happens
Using ondie() to diagnose runtime errors
Using logging to diagnose errors
Standard diagnostic log output
EPL eliminates many runtime errors because of the following:
*Strict, static typing, so there are no class cast exceptions.
*No implicit type conversion so there are no number format exceptions.
*Values can only be "null" (or "empty" as it is called in EPL) if they are explicitly declared as optional, and can be accessed safely without risk of null pointer exceptions. See the description of the optional type in the API Reference for EPL (ApamaDoc) and The ifpresent statement for more information.
However, EPL cannot entirely eliminate runtime errors. For example, you receive a runtime error if you try to divide by zero or specify an array index that is out of bounds. Some runtime errors are obscure. For example:
If foo is not in mySeq, indexOf() returns –1, which causes a runtime error.
See also Exception handling.

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.