Source code for scrutiny.sdk.exceptions

#    exceptions.py
#        Definitions of all exceptions used across the Scrutiny SDK
#
#   - License : MIT - See LICENSE file.
#   - Project :  Scrutiny Debugger (github.com/scrutinydebugger/scrutiny-python)
#
#   Copyright (c) 2021 Scrutiny Debugger

[docs] class ScrutinySDKException(Exception): """Base class for all Scrutiny SDK exceptions""" pass
[docs] class ConnectionError(ScrutinySDKException): """Raised when a problem with the server communication occurs""" pass
[docs] class InvalidValueError(ScrutinySDKException): """Raised when trying to access a value that is unavailable""" pass
[docs] class OperationFailure(ScrutinySDKException): """Generic exception raised when a synchronous operation fails""" pass
[docs] class TimeoutException(ScrutinySDKException): """Raised when synchronous operations times out""" pass
[docs] class NameNotFoundError(ScrutinySDKException): """Raised when trying to reference an element by its name and the name is invalid or unknown""" pass
[docs] class BadEnumError(ScrutinySDKException): """Raised when trying access an enum value that does not exists""" pass
[docs] class NotAllowedError(ScrutinySDKException): """Raise when an operation is not allowed by the SDK""" pass
[docs] class ApiError(ScrutinySDKException): """Base class for all error related to the API""" pass
[docs] class BadResponseError(ApiError): """Raised when the server API does not behave as expected. Rarely reaches the end user and often translate to an :class:`OperationFailure<OperationFailure>`""" pass
[docs] class ErrorResponseException(ApiError): """Raised when the server API actively reject a request. Rarely reaches the end user and often translate to an :class:`OperationFailure<OperationFailure>`""" pass