How to use the pyexasol.exceptions.ExaError function in pyexasol

To help you get started, we’ve selected a few pyexasol examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github badoo / pyexasol / pyexasol / exceptions.py View on Github external
def __str__(self):
        if not self.connection.options['verbose_error']:
            return self.message

        params = self.get_params_for_print()
        pad_length = max(len(x) for x in params)
        res = ''

        for k in params:
            res += (' ' * 4) + k.ljust(pad_length) + '  =>  ' + params[k] + '\n'

        return '\n(\n' + res + ')\n'


class ExaRuntimeError(ExaError):
    pass


class ExaCommunicationError(ExaError):
    """
    WebSocket communication failure after connection was established
    """
    pass


class ExaRequestError(ExaError):
    """
    Generic error returned from Exasol server after making a request
    """
    def __init__(self, connection, code, message):
        self.code = code
github badoo / pyexasol / pyexasol / exceptions.py View on Github external
class ExaConnectionDsnError(ExaConnectionError):
    """
    Specific error for connection failure related to DSN (connection string) issues
    """
    pass


class ExaConnectionFailedError(ExaConnectionError):
    """
    Specific error related to establishing WebSocket communication
    """
    pass


class ExaConcurrencyError(ExaError):
    """
    Detected an attempt to run multiple queries in multiple threads at the same time
    """
    pass
github badoo / pyexasol / pyexasol / exceptions.py View on Github external
return '\n(\n' + res + ')\n'


class ExaRuntimeError(ExaError):
    pass


class ExaCommunicationError(ExaError):
    """
    WebSocket communication failure after connection was established
    """
    pass


class ExaRequestError(ExaError):
    """
    Generic error returned from Exasol server after making a request
    """
    def __init__(self, connection, code, message):
        self.code = code

        super().__init__(connection, message)

    def get_params_for_print(self):
        params = super().get_params_for_print()
        params['code'] = self.code

        return params


class ExaAuthError(ExaRequestError):
github badoo / pyexasol / pyexasol / exceptions.py View on Github external
params = self.get_params_for_print()
        pad_length = max(len(x) for x in params)
        res = ''

        for k in params:
            res += (' ' * 4) + k.ljust(pad_length) + '  =>  ' + params[k] + '\n'

        return '\n(\n' + res + ')\n'


class ExaRuntimeError(ExaError):
    pass


class ExaCommunicationError(ExaError):
    """
    WebSocket communication failure after connection was established
    """
    pass


class ExaRequestError(ExaError):
    """
    Generic error returned from Exasol server after making a request
    """
    def __init__(self, connection, code, message):
        self.code = code

        super().__init__(connection, message)

    def get_params_for_print(self):
github badoo / pyexasol / pyexasol / exceptions.py View on Github external
class ExaQueryTimeoutError(ExaQueryError):
    """
    Specific error for SQL query reaching QUERY_TIMEOUT and being terminated by server
    """
    pass


class ExaQueryAbortError(ExaQueryError):
    """
    Specific error for SQL query being aborted with .abort_query() call or KILL STATEMENT
    """
    pass


class ExaConnectionError(ExaError):
    """
    Generic error for connection failures
    """
    pass


class ExaConnectionDsnError(ExaConnectionError):
    """
    Specific error for connection failure related to DSN (connection string) issues
    """
    pass


class ExaConnectionFailedError(ExaConnectionError):
    """
    Specific error related to establishing WebSocket communication