How to access 'unable to unregister replica' error message

856
2
01-18-2017 01:05 PM
by Anonymous User
Not applicable

Hi all

If I call the unregister method on a geodatabase, I can it to unregister successfully.

But if, for some reason (say, a bug in my code or something outside my control like someone manually shifting geodatabase files around!), the code tried to unregister a geodatabase that had already been unregistered, how to I access the error message?

In fiddler I can see a JSON response along the lines of...   code 404, 'Replica with GUID.... does not exist on the server...' etc. That's fine, but I can't seem to figure out where I can access this error message from within the code?

Cheers,

-Paul

Tags (2)
0 Kudos
2 Replies
LucasDanzinger
Esri Frequent Contributor

Well, since the GeodatabaseSyncTask class inherits from RuntimeObject, it has an "error" signal - ArcGIS Runtime SDK for Qt QML API: RuntimeObject Class Reference 

This passes through a RuntimeError. In theory, the error should be emitted through this signal, and you should be able to print out the description of the error. Hopefully that is what is happening here, but you never know. If you find a scenario where you aren't getting errors through this signal, but an operation fails silently, then this is likely a bug.

0 Kudos
by Anonymous User
Not applicable

Hi Luke

I know you're busy with UC so this probably won't get looked at for a few weeks....  but thought I'd update while I remember...

From my testing, it seems that the RuntimeError object doesn't get populated with anything in this scenario. If I console log 

 error.category, error.description

they are both undefined.

The GeodatabaseSyncStatusInfo object's 'status' gets set to a rather generic '5' which just means 'Failed' and doesn't provide any useful info.


0 Kudos