aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/data/tryStatement.1.qml
blob: 71cc67a941ccdc427a37c047790945e859a27825 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import Qt.test 1.0

MyQmlObject {
    property int defaultValue: 123

    function go() {
        undefinedObject.method() // this call will throw an exception
        return 321
    }

    value: try { go() } catch(e) { defaultValue }
}