aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/data/tryStatement.3.qml
blob: 7f5a22a45974f789d3e5b55201e7af67a43e5ab1 (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
    }

    qjsvalue: try { var p = go() } catch(e) { var p = defaultValue } finally { p == 123 }
}