-
Notifications
You must be signed in to change notification settings - Fork 697
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
[Suggestion] Log the SQL query when an exception is thrown #288
Comments
Right now every SQLException has thrown inside Could you provide a sample output without query you get on exception? |
No statement seems to be logged when there is an exception either in the creation of the statement (eg using As a simple example, when inserting a row with a missing column, the statement is never logged if it fails:
There were a few other instances where there were crashes as I was trying to make new Exposed statements though I do not have them at hand. To go hand in hand with this, is there a way of simply printing the generated statement so we can see if it matches what we want to create? |
Another example when testing #298:
This likely has to do with a replace query, though I will have to figure out what exactly is getting called as it isn't printed |
Fixed in master, please check that this is what you expected |
I'm not entirely sure if this works or not. I tried to add unit tests to my project with travis, and I received the following error:
I believe it is attempting to do the transaction 3 times, but each time only shows the creation and deletion of tables. I have already tested in another method that that portion is fine. Another thing to note, but by default, only |
Fixes for that issue wasn't released yet. Do you mind to test it again if I'll provide you with a custom snapshot jar? |
I can test it. It may be easier to import if you just push to a branch and I build the specific commit with jitpack |
Using
logger.addLogger(StdOutSqlLogger)
, we can see the query outputs whenever one has been executed. However, if any exception is thrown, we just get the message from the sql dependency, and no information (from what I am aware) on the query that is being generated. It would help a lot if there was a way of outputting the erroneous line for debugging purposesThe text was updated successfully, but these errors were encountered: