Skip to main content

report_internal_error

Reports an internal error by preparing the exception for the task backend, issuing a runtime warning with the traceback, and returning an ExceptionInfo object.

def report_internal_error(
task: Task,
exc: Exception
) - > ExceptionInfo

Reports an exception that occurred outside the task body by preparing the exception for the backend and issuing a runtime warning with the traceback.

Parameters

NameTypeDescription
taskTaskThe task instance whose backend is used to prepare and serialize the exception data.
excExceptionThe exception instance that was raised outside the normal execution flow of the task.

Returns

TypeDescription
ExceptionInfoAn ExceptionInfo object containing the processed exception type, value, and traceback, marked as an internal error.