-
Notifications
You must be signed in to change notification settings - Fork 71
Copy: Show error message on failure #184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This ensures that the exception thrown includes the cause. Sadly it seems that the only way to determine that a COPY IN has failed is to fail to parse the row count. It seems that all of the getResults calls after the putCopyEnd command inexplicably return success, despite the fact that something failed.
It would be nice to throw an exception other than the default |
Also, it would be nice to have a demo of several failure modes of COPY IN, possibly as part of the test suite, though I think that's slightly less important than the comment above. |
Leon P Smith [email protected] writes:
|
Hmm, what's the testing strategy where you commit some expected output, then you can simply inspect the diffs as you work on the code? That seems like a good strategy here, though I'm certainly open to other possibilities. |
This issue made me think of #181, which seems at least somewhat related. I had a small bit of difficulty finding that issue; I didn't remember that it was a PR, that it was recent, and that it was you! |
Leon P Smith [email protected] writes:
|
Leon P Smith [email protected] writes:
|
Sure, having the test suite depend on tasty-golden sounds fine to me. (Also, I'm less picky about test suite dependencies.) |
Also, I'm not that surprised that this is the fix that was needed in #181, it was something vaguely along these lines I was sort of expecting in the first place. |
See lpsmith#184 for original issue.
This ensures that the exception thrown includes the cause of the error. Sadly it seems that the only way to determine that a COPY IN has failed is to fail to parse the row count (as the result status is typically an empty string. It seems that all of the getResults calls after the putCopyEnd command inexplicably return success, despite the fact that something failed.