Skip to main content

return_exception

Return a tuple containing the exception message and sentinel value.

def return_exception(
e: Exception
) - > tuple

Return a tuple containing the exception message and sentinel value.

Parameters

NameTypeDescription
eExceptionThe exception instance or error object to be processed and returned

Returns

TypeDescription
tupleA tuple containing the original exception object and a boolean sentinel value (True) indicating an error state