get_exception

Applicable Products

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

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 set_exception_catch, the first element in the return value of this API is false.