diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2023-05-16 17:14:03 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2023-05-17 08:49:05 +0000 |
commit | 610508fcbf95b16567a17f53fd370f9b0ae3505b (patch) | |
tree | 5812c8e4c691e808cb340cc55a92038abda35142 /tests/auto/language/testdata/throw.qbs | |
parent | 36887c42052e92eb8d0576e6d25699e0a49bc1f9 (diff) | |
download | qbs-610508fcbf95b16567a17f53fd370f9b0ae3505b.tar.gz |
Properly handle non-string exceptions2.0
Fixes: QBS-1734
Change-Id: If7901dc698fdd5ee44021a3b92cf28295123eccc
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Diffstat (limited to 'tests/auto/language/testdata/throw.qbs')
-rw-r--r-- | tests/auto/language/testdata/throw.qbs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/language/testdata/throw.qbs b/tests/auto/language/testdata/throw.qbs new file mode 100644 index 000000000..e9a97efb5 --- /dev/null +++ b/tests/auto/language/testdata/throw.qbs @@ -0,0 +1,16 @@ +Project { + property string throwType + property bool dummy: { + if (throwType === "bool") + throw true; + if (throwType === "int") + throw 43; + if (throwType === "string") + throw "an error"; + if (throwType === "list") + throw ["an", "error"]; + if (throwType === "object") + throw { result: "crash", reason: "overheating" }; + throw "type missing"; + } +} |