I found a weird situation. I changed the name of a Property Key for a User Setting. My code worked in the simulator but crashed on the getValue() call on a real device.
After several attempts to figure it out... for grins, I went into Garmin Connect Mobile and opened the Settings function, and hit SAVE. Then cycled the power on the real device and the data field worked!! So, something was corrupted in the Storage. I imagine this might be a common repeatable bug related to this scenario - changing a Property Key Name?
Anyway, I want to implement a try/catch on my getValue() calls to keep this crap from happening to all the users of my data field... I've never used try/catch before. Seems like something simple like this could work:
try { getV = Properties.getValue("KeyName"); } catch( ex ) { getV = KeyNameDefault; }
I see there is also a "finally" block. It looks like finally just runs that block of code no matter what.
If so, how is this:
try { X; }
catch ( ex ) { Y; }
finally { Z; }
Any different from this:
try { X; }
catch ( ex ) { Y; }
Z;