Skip to content

[BUG] unable to catch exception from getVariable #561

@royyeh22

Description

@royyeh22

Steps To Reproduce

Image

Steps To Reproduce

  1. have the following script:
    try{
        showToast(getVariable('not_in_global')); // not_in_global doesn't exist
        showToast(JSON.parse('{')); // '{' is not a valid json
    }
    catch (e)
    {
        showDialog(e.message, "ex");
    }

Expected behavior

exception from getVariable can be catched

Actual behavior

It pops up an 'Error' dialog and then aborts, when running into getVariable.
It's not like JSON.parse which indeed shows the customized 'ex'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions