Exceptions
These exceptions are used within the code - there may be some generic OS exceptions that things like communications issues can throw as well:
Broadworks OCI-P Interface Exception Classes
Exception classes used by the API.
OCIError (Exception)
Base Exception raised by OCI operations.
Attributes:
Name | Type | Description |
---|---|---|
message |
str |
explanation of why it went bang |
object |
the thing that went bang |
Source code in broadworks_ocip/exceptions.py
@attr.s(slots=True, frozen=True)
class OCIError(Exception):
"""Base Exception raised by OCI operations.
Attributes:
message: explanation of why it went bang
object: the thing that went bang
"""
message: str = attr.ib()
object = attr.ib(default=None)
def __str__(self):
return f"{self.__class__.__name__}({self.message})"
__init__(self, message, object=None)
special
Method generated by attrs for class OCIError.
Source code in broadworks_ocip/exceptions.py
def __init__(self, message, object=attr_dict['object'].default):
_setattr = _cached_setattr.__get__(self, self.__class__)
_setattr('message', message)
_setattr('object', object)
OCIErrorAPISetup (OCIError)
Exception raised when life becomes too much for the software.
Subclass of OCIError()
Source code in broadworks_ocip/exceptions.py
@attr.s(slots=True, frozen=True)
class OCIErrorAPISetup(OCIError):
"""
Exception raised when life becomes too much for the software.
Subclass of OCIError()
"""
pass
__init__(self, message, object=None)
special
Method generated by attrs for class OCIErrorAPISetup.
Source code in broadworks_ocip/exceptions.py
def __init__(self, message, object=attr_dict['object'].default):
_setattr = _cached_setattr.__get__(self, self.__class__)
_setattr('message', message)
_setattr('object', object)
OCIErrorAttributeMissing (OCIError)
Exception raised when a required attribute is missing.
Subclass of OCIError()
Source code in broadworks_ocip/exceptions.py
@attr.s(slots=True, frozen=True)
class OCIErrorAttributeMissing(OCIError):
"""
Exception raised when a required attribute is missing.
Subclass of OCIError()
"""
pass
__init__(self, message, object=None)
special
Method generated by attrs for class OCIErrorAttributeMissing.
Source code in broadworks_ocip/exceptions.py
def __init__(self, message, object=attr_dict['object'].default):
_setattr = _cached_setattr.__get__(self, self.__class__)
_setattr('message', message)
_setattr('object', object)
OCIErrorResponse (OCIError)
Exception raised when an ErrorResponse is received and decoded.
Subclass of OCIError()
Source code in broadworks_ocip/exceptions.py
@attr.s(slots=True, frozen=True)
class OCIErrorResponse(OCIError):
"""
Exception raised when an ErrorResponse is received and decoded.
Subclass of OCIError()
"""
pass
__init__(self, message, object=None)
special
Method generated by attrs for class OCIErrorResponse.
Source code in broadworks_ocip/exceptions.py
def __init__(self, message, object=attr_dict['object'].default):
_setattr = _cached_setattr.__get__(self, self.__class__)
_setattr('message', message)
_setattr('object', object)
OCIErrorTimeOut (OCIError)
Exception raised when nothing is head back from the server.
Subclass of OCIError()
Source code in broadworks_ocip/exceptions.py
@attr.s(slots=True, frozen=True)
class OCIErrorTimeOut(OCIError):
"""
Exception raised when nothing is head back from the server.
Subclass of OCIError()
"""
pass
__init__(self, message, object=None)
special
Method generated by attrs for class OCIErrorTimeOut.
Source code in broadworks_ocip/exceptions.py
def __init__(self, message, object=attr_dict['object'].default):
_setattr = _cached_setattr.__get__(self, self.__class__)
_setattr('message', message)
_setattr('object', object)
OCIErrorUnexpectedAttribute (OCIError)
Exception raised when additional elements passed to init
Subclass of OCIError()
Source code in broadworks_ocip/exceptions.py
@attr.s(slots=True, frozen=True)
class OCIErrorUnexpectedAttribute(OCIError):
"""
Exception raised when additional elements passed to __init__
Subclass of OCIError()
"""
pass
__init__(self, message, object=None)
special
Method generated by attrs for class OCIErrorUnexpectedAttribute.
Source code in broadworks_ocip/exceptions.py
def __init__(self, message, object=attr_dict['object'].default):
_setattr = _cached_setattr.__get__(self, self.__class__)
_setattr('message', message)
_setattr('object', object)
OCIErrorUnknown (OCIError)
Exception raised when life becomes too much for the software.
Subclass of OCIError()
Source code in broadworks_ocip/exceptions.py
@attr.s(slots=True, frozen=True)
class OCIErrorUnknown(OCIError):
"""
Exception raised when life becomes too much for the software.
Subclass of OCIError()
"""
pass
__init__(self, message, object=None)
special
Method generated by attrs for class OCIErrorUnknown.
Source code in broadworks_ocip/exceptions.py
def __init__(self, message, object=attr_dict['object'].default):
_setattr = _cached_setattr.__get__(self, self.__class__)
_setattr('message', message)
_setattr('object', object)