GetException
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
x |
|
x |
|
x |
Function Description
Retrieves exceptions inside the UDF. If the exception capture function is enabled, you need to attempt to capture exceptions at the start of the Proc function within the UDF.
Prototype
1 | bool GetException(int32_t &expCode, uint64_t &userContextId); |
Parameters
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, which is used to identify the reported exception. This ensures that other UDFs can identify the specific data batch that caused the exception based on this ID after capturing the exception. |
Returns
Whether an exception occurs.
- true: An exception is captured.
- false: No exception needs to be captured.
Exception Handling
None
Constraints
If exception reporting is not enabled for the current DataFlow graph through SetExceptionCatch, the return value of GetException is fixed to false.