Collect all error messages for Error.Error()#250
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #250 +/- ##
===========================================
+ Coverage 80.56% 96.60% +16.04%
===========================================
Files 35 92 +57
Lines 6910 74361 +67451
===========================================
+ Hits 5567 71840 +66273
- Misses 1070 2186 +1116
- Partials 273 335 +62
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
03636c0 to
138412a
Compare
|
@shueybubbles, can you have another look? I've fixed the comments: now tests do check how error messages are formed in a more detailed way. |
|
@jegorbunov friendly nudge — two items from the last review still open:
Happy to push the fix to your branch ( |
Before this commit all Error-related tests would not specify the expected behaviour of Error.Error() method. This commit adds such expectations so that it is visible when these expectations change.
138412a to
3528ecc
Compare
Also error numbers were added to the Error() returned message. BREAKING CHANGE: Before this commit an error Error() returned text would look like: `mssql: message` After this commit: `mssql: message (error number)` And even: ``` mssql: message 1 (error number 1) mssql: message 2 (error number 2) ... ```
3528ecc to
9602fa0
Compare
Thanks for the wait. I've fixed the first problem and added a |
Sometimes mssql server reports a chain of errors with the last error having a message like:
Could not drop constraint. See previous errors.. Since users code will generally print an error by simply using.Error()method to get the details about an underlying error then the method should provide as much detail as possible in my opinion.CHANGELOG
BREAKING CHANGE:
Before this patch an
Error()method would return a message like:mssql: messageAfter this commit it returns:
mssql: message (error number)And even: