Acknowledged

vívoactive 3: 7.70 getProperty Unhandled Exception

sdk 4.0.2, minSdkVersion="2.4.0"


Error Name: Unhandled Exception
Occurrences: 2
First Occurrence: 2021-06-01
Last Occurrence: 2021-06-01
Devices:
    vĂ­voactive® 3: 7.70
App Versions: 1.14.11
Languages: eng
Backtrace:
    PSX1_Utils.getPrp:491
    PSX1_Vie.onSC:605
    PSX1_Vie.onLayout:365

1. No low power because from onLayout after initialise

2. code

function onSC()//view
{
   ...
   getPrp("BA", 30);
   ...
}

using Toybox.Application.Properties    as PRP;
function getPrp(k, d)//global
{
    k = PRP.getValue(k);<---------error
}

3. properties and settings

<setting propertyKey="@Properties.BA" title="@Strings.BA">
        <settingConfig type="numeric" min="0" max="100" required="true"/>
</setting>

<property id="BA" type="number">30</property>

Parents
  • no, only error from era, from doc

    • (ObjectStoreAccessException) —                  NO it's from view

      Thrown if called from a Background process (data should be passed back to the main application from background processes with Background.exit())

    • (UnexpectedTypeException) —                    NO, simple integer

      Thrown if key is a disallowed data type

    • (InvalidKeyException) —                              NO, there is key

      Thrown if key does not exist in Application Properties

    can you send me  code for checking exception, probably in getPrp

    function getPrp(k, d)
    {
        k = PRP.getValue(k);
        if(k == null)
        {
            k = d;
        }
        return k;
    }

Comment
  • no, only error from era, from doc

    • (ObjectStoreAccessException) —                  NO it's from view

      Thrown if called from a Background process (data should be passed back to the main application from background processes with Background.exit())

    • (UnexpectedTypeException) —                    NO, simple integer

      Thrown if key is a disallowed data type

    • (InvalidKeyException) —                              NO, there is key

      Thrown if key does not exist in Application Properties

    can you send me  code for checking exception, probably in getPrp

    function getPrp(k, d)
    {
        k = PRP.getValue(k);
        if(k == null)
        {
            k = d;
        }
        return k;
    }

Children
No Data