Is there a way to catch SqliteErrorCode from the exception?
((Microsoft.Data.Sqlite.SqliteException)ex.InnerException).SqliteErrorCode 19
Solution offered here by another question as casting exception to a SqlException doesn't work?
One solution could be to check if the Message
contains certain string, but is there a way to do it by the error code?
Aucun commentaire:
Enregistrer un commentaire