Core.DataTypes.ComplexDataType.Exception

From emotive
Jump to navigation Jump to search

Classification

Name Exception
Class Complex Data Type
Base Data Type ComplexType
SpecifiedBy ISO 13209-3

Description

Exceptions are complex data types which are all based on a common Exception type. They carry an exception text and stack trace information; both of which are created once the exception is created and cannot be modified later.

Among the OTX Core data types, there are two categories of exceptions:

In contrast to the UserException, implicit exceptions can not be created explicitly by the OTX autor; they are created implicitly by actions or terms when certain error conditions occur at runtime.

Exclamation.png Important: When an implicit exception is created, the OTX runtime system shall assign a meaningful exception text to it. The text shall explain the exception situation precisely from a mostly technical view. Preferably the text should also be understandable for the user.
Exclamation.png Important: The stack trace information for an exception shall be determined at the moment when the exception is created, not when it is thrown. The stack trace information can be accessed by the GetStackTrace term, which returns a list of fully qualified procedure names representing a snapshot of the procedure call stack.

In addition to the exception text and the stack trace information, the explicit exception UserException also carries an exception qualifier. Qualifiers shall be used by OTX authors to categorize user exceptions. Both qualifier and text of a UserException are defined by the OTX author, not by the OTX runtime system.

Icons Note.png The common base type Exception can be used in Handler nodes to catch any kind of exception

Exception and UserException are checked exceptions which should be handled by the OTX procedure. If they are not handled, OTX checker applications shall provide warnings.