CustomError
This error is raised when the user raises a custom error.
Constructor
Signature
def CustomError(
code: str,
message: str
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| code | str | The error code. |
| message | str | The error message. |
Methods
from_exception()
@classmethod
def from_exception(
e: Exception
) - > [CustomError](customerror.md?sid=flyte_errors_customerror)
Create a CustomError from an exception. The exception's class name is used as the error code and the exception message is used as the error message.
Parameters
| Name | Type | Description |
|---|---|---|
| e | Exception | The exception object from which to create the CustomError. Its class name will be the error code and its message will be the error message. |
Returns
| Type | Description |
|---|---|
[CustomError](customerror.md?sid=flyte_errors_customerror) | A new CustomError instance populated with details from the provided exception. |