JamieKitson / FlickrAutoUploader

Windows Phone Flickr Auto Uploader
0 stars 1 forks source link

Handle Test Exceptions #42

Open JamieKitson opened 9 years ago

JamieKitson commented 9 years ago

Exceptions coming back from Test are handled as if the test has failed, however this leads to undesirable consequences, for example if the test fails when setting the enabled toggle switch in the UI then the tokens are unset. (Or maybe we shouldn't unset the tokens?)

JamieKitson commented 9 years ago

Test() is only used in three places, once on UI load to either load the albums or disable the app, once when the app is enabled to either add the scheduled task or unset the tokens and start the auth process and once before the app is run.

Maybe the first two uses could benefit from distinguishing between returning false and an exception.

JamieKitson commented 9 years ago

An added complication is that the method doesn't ever return false, it always returns an exception if the login fails.

https://www.flickr.com/services/api/flickr.test.login.html

JamieKitson commented 9 years ago

Add a single Main.Text() method in the UI with a popup when the test fails.