-
Notifications
You must be signed in to change notification settings - Fork 348
Closed
Description
The Exception.Data dictionary can be used to "provide additional user-defined information about the exception".
MySQL bug 27436 asked for the error number to be added, so that code that generically handles DbException can read it.
Npgsql adds most public members to the Data dictionary they create: https://github.com/npgsql/npgsql/blob/7b13abaa958375f8166815ab3ffda54c2d17a89a/src/Npgsql/PostgresException.cs#L315-L333
We should use the "Server Error Code" key that Connector/NET uses, and also add "SqlState".
Note that Dictionary<string, object> should not be used as the implementation: npgsql/npgsql#2071.
Metadata
Metadata
Assignees
Labels
No labels