Skip to content
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

Add field index to DataTruncation [JDBC405] #446

Closed
firebird-automations opened this issue Sep 8, 2015 · 5 comments
Closed

Add field index to DataTruncation [JDBC405] #446

firebird-automations opened this issue Sep 8, 2015 · 5 comments

Comments

@firebird-automations
Copy link

Submitted by: Felipe Jaekel (fkj)

I'd like to suggest the addition of the field name on the message of the java.sql.DataTruncation that is thrown from FBWorkaroundStringField.java:78, since it would make easier to track where the problem happened on tables with a lot of string fields.

Thanks

Commits: 48257e8

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

We currently use the default java.sql.DataTruncation exception class which doesn't have support for custom messages (except by subclassing and overriding getMessage, which I'd prefer not to do). java.sql.DataTruncation does have support for reporting the index of the field, but we currently don't have the column index information available there, and making that info available will take some work.

I will park this for now, if I am going to change this, then likely that will be in Jaybird 3.0 or later.

As a 'workaround': the stacktrace does provide you where in your code the setString was called, and that should allow you to pinpoint the offending column (assuming you have compiled your own code with linenumber information).

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Fix Version: Jaybird 3.0 [ 10440 ]

summary: Add field name to DataTruncation => Add field index to DataTruncation

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

Added field index to the DataTruncation exception.

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants