I'm getting some ERA reports of an unhandled exception when calling Application.Properties.getValue() from onLayout() - but I've no idea why it could be happening ...
It is happening in both an app and a watchface - and it's always on the very first call to access the properties after starting up.
The property is defined in the properties.xml just like normal:
<property id="pg" type="boolean">false</property> <!-- position got -->
And is accessed just with a normal call:
var v = Application.Properties.getValue("pg");
It clearly works for most people using the app, but why are there some instances of exceptions being created?
The documentation says these are the possible exceptions:
- (Toybox::Lang::UnexpectedTypeException) —
Thrown if key is of type null, Array, or Dictionary
Thrown if key does not exist in Application Settings
Is there some other exception possible here?
Any suggestions for how I could debug this?