diff --git a/pynuodb/exception.py b/pynuodb/exception.py index ae18820..e1497d2 100644 --- a/pynuodb/exception.py +++ b/pynuodb/exception.py @@ -87,10 +87,10 @@ def db_error_handler(error_code, error_string): error_code_string = protocol.lookup_code(error_code) if error_code in protocol.DATA_ERRORS: raise DataError(error_code_string + ': ' + error_string) - elif error_code in protocol.OPERATIONAL_ERRORS: + elif error_code in protocol.OPERATIONAL_ERRORS: raise OperationalError(error_code_string + ': ' + error_string) - elif error_code in protocol.INTEGRITY_ERRORS: - raise IntegrityError(error_code_string + ': ' + error_string) + elif error_code in protocol.INTEGRITY_ERRORS: + raise IntegrityError(error_code_string + ': ' + error_string) elif error_code in protocol.INTERNAL_ERRORS: raise InternalError(error_code_string + ': ' + error_string) elif error_code in protocol.PROGRAMMING_ERRORS: