aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/data/tryStatement.3.qml
blob: 04b39f73d5e6f6c32665d47cc2cb6ad60ea8765a (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 { var p = go() } catch(e) { var p = defaultValue } finally { p == 123 }
}