Skip to content

Commit

Permalink
error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
sitingren committed Nov 21, 2023
1 parent 8d251ad commit 454544d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions vertica_python/vertica/cursor.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,10 @@ def nextset(self):
# result of a DDL/transaction
self.rowcount = -1
return True
elif isinstance(self._message, messages.CopyInResponse):
raise errors.MessageError(
'Unexpected nextset() state after END_OF_RESULT_RESPONSES: {self._message}\n'
'HINT: Do you pass multiple COPY statements into Cursor.copy()?')
elif isinstance(self._message, messages.ErrorResponse):
raise errors.QueryError.from_error_response(self._message, self.operation)
else:
Expand Down

0 comments on commit 454544d

Please sign in to comment.