GetException

Applicability

Product

Supported

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

x

Atlas inference products

x

Atlas training products

x

Function Description

Obtains exceptions by a UDF. If the exception capture function is enabled, try to capture the exception at the start position of the Proc function in the UDF.

Prototype

1
bool GetException(int32_t &expCode, uint64_t &userContextId);

Command-Line Options

Parameter

Input/Output

Description

expCode

Input

Error code of the user-defined exception that is captured.

userContextId

Input

Context ID of a user-defined exception that is captured, which is used to identify the reported exception. This ensures that other UDFs can detect the data batch where the exception occurs based on the ID after capturing the exception.

Returns

Whether an exception occurs.

  • true: An exception is captured.
  • false: No exception needs to be captured.

Troubleshooting

None

Constraints

If exception reporting is not enabled for the current DataFlow graph through SetExceptionCatch, the return value of GetException is fixed to false.