Reputation: 745
I am doing one synchronization example. I got two exceptions which are having same details about exception. But with the error codes.
And both exceptions have the same Inner Exceptions
What is means? What Error Codes will tell us more than exceptions? How to get the details about my error code. Thanks in Advance
Microsoft.Synchronization.SyncException: A storage engine operation failed with error code 25051 (HRESULT = 0x80004005, Source IID = {0FB15084-AF41-11CE-BD2B-204C4F4F5020}, Parameters=(0, 0, 0, , , , )).
Microsoft.Synchronization.SyncException: A storage engine operation failed with error code 25009 (HRESULT = 0x80004005, Source IID = {0FB15084-AF41-11CE-BD2B-204C4F4F5020}, Parameters=(0, 0, 0, , , , )).
Upvotes: 2
Views: 517
Reputation: 49260
From the wording of the message it looks like these are SQL CE errors. If so, have a look here for the meaning of the actual error codes. For .NET code that wraps native code, it is not uncommon that one managed exception, SyncException here, is used with multiple error codes in addition (most prominent example Win32Exception).
From the documentation there seems to be no apparent way to get this numeric code.
However, whether you can really react differently in your code, depending on one error code or the other, is questionable anyway. Log the error with all details and be done with it.
Upvotes: 2