[CSHARP-2593] Add numeric error code to default error message in NativeMethods.CreateException Created: 17/Apr/19 Updated: 31/Mar/22 |
|
| Status: | Backlog |
| Project: | C# Driver |
| Component/s: | Error Handling |
| Affects Version/s: | 2.11.0 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Robert Stam | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
The NativeMethods.CreateException method maps a known errorCode to a corresponding string, but if the errorCode is not one we know about we use the defaultMessage. When the defaultMessage is used this way some information is lost because we don't know what the errorCode was. We should append the error code to the default message, something like:
|