get_exception

Applicability

Product

Supported

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

x

Atlas inference product

x

Atlas training product

x

Function Description

The UDF obtains the exception reported by other UDF nodes.

Prototype

1
get_exception(self) -> tuple

Parameters

None

Returns

A tuple (bool, int, int). The elements in the tuple are described as follows:

  • The first element in the tuple indicates whether an exception exists. True indicates that an exception is successfully captured, and False indicates that no exception exists.
  • The second element in the tuple identifies the error code of the user-defined exception in the captured exception.
  • The third element in the tuple identifies the context ID of a user-defined exception in the captured exception, 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 obtaining the captured exception.

Exception Handling

None

Constraints

If exception reporting is not enabled for the dataflow graph through the set_exception_catch API, the first element returned after this API is called is false.