Module taosrest.errors

Expand source code
class Error(Exception):
    def __init__(self, msg=None, errno=0xffff):
        self.msg = msg
        self.errno = errno
        self._full_msg = "[0x%04x]: %s" % (self.errno & 0xffff, self.msg)

    def __str__(self):
        return self._full_msg


class ExecutionError(Error):
    """Run sql error"""
    pass


class ConnectionError(Error):
    """Exception raised for connection failed"""
    pass


class InterfaceError(Error):
    pass


class DatabaseError(Error):
    pass


class InternalError(DatabaseError):
    pass


class OperationalError(DatabaseError):
    pass


class ProgrammingError(DatabaseError):
    pass


class IntegrityError(DatabaseError):
    pass


class DataError(DatabaseError):
    pass


class NotSupportedError(DatabaseError):
    pass

Classes

class ConnectionError (msg=None, errno=65535)

Exception raised for connection failed

Expand source code
class ConnectionError(Error):
    """Exception raised for connection failed"""
    pass

Ancestors

  • Error
  • builtins.Exception
  • builtins.BaseException
class DataError (msg=None, errno=65535)

Common base class for all non-exit exceptions.

Expand source code
class DataError(DatabaseError):
    pass

Ancestors

class DatabaseError (msg=None, errno=65535)

Common base class for all non-exit exceptions.

Expand source code
class DatabaseError(Error):
    pass

Ancestors

  • Error
  • builtins.Exception
  • builtins.BaseException

Subclasses

class Error (msg=None, errno=65535)

Common base class for all non-exit exceptions.

Expand source code
class Error(Exception):
    def __init__(self, msg=None, errno=0xffff):
        self.msg = msg
        self.errno = errno
        self._full_msg = "[0x%04x]: %s" % (self.errno & 0xffff, self.msg)

    def __str__(self):
        return self._full_msg

Ancestors

  • builtins.Exception
  • builtins.BaseException

Subclasses

class ExecutionError (msg=None, errno=65535)

Run sql error

Expand source code
class ExecutionError(Error):
    """Run sql error"""
    pass

Ancestors

  • Error
  • builtins.Exception
  • builtins.BaseException
class IntegrityError (msg=None, errno=65535)

Common base class for all non-exit exceptions.

Expand source code
class IntegrityError(DatabaseError):
    pass

Ancestors

class InterfaceError (msg=None, errno=65535)

Common base class for all non-exit exceptions.

Expand source code
class InterfaceError(Error):
    pass

Ancestors

  • Error
  • builtins.Exception
  • builtins.BaseException
class InternalError (msg=None, errno=65535)

Common base class for all non-exit exceptions.

Expand source code
class InternalError(DatabaseError):
    pass

Ancestors

class NotSupportedError (msg=None, errno=65535)

Common base class for all non-exit exceptions.

Expand source code
class NotSupportedError(DatabaseError):
    pass

Ancestors

class OperationalError (msg=None, errno=65535)

Common base class for all non-exit exceptions.

Expand source code
class OperationalError(DatabaseError):
    pass

Ancestors

class ProgrammingError (msg=None, errno=65535)

Common base class for all non-exit exceptions.

Expand source code
class ProgrammingError(DatabaseError):
    pass

Ancestors