OperationError Class

Represents an error that occurred during an operation.

This class wraps an exception and provides a consistent interface for accessing error information.

Constructor

OperationError()

Parameters

Name Description
exception
Required

Methods

__init__

Initialize a new instance of the OperationError class.

__new__

__init__

Initialize a new instance of the OperationError class.

__init__(exception: Exception)

Parameters

Name Description
exception
Required

The exception associated with the error.

Exceptions

Type Description

If exception is None.

__new__

__new__(**kwargs)

Attributes

exception

Get the exception associated with the error.

Returns

Type Description

The exception associated with the error.

message

Get the message associated with the error.

Returns

Type Description
str

The error message from the exception.