diff options
author | Luca Bruno <lucabru@src.gnome.org> | 2011-01-21 18:31:07 +0100 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2011-01-21 18:31:07 +0100 |
commit | 7a0babe08ac1ee351ef1e71e1efee37d7988380a (patch) | |
tree | 2430f9d589e2d2c4042651fc3ef43b4ba617e821 /tests | |
parent | 489164f6eddb09bb525ec4c5f02a4e8542a68f12 (diff) | |
download | vala-7a0babe08ac1ee351ef1e71e1efee37d7988380a.tar.gz |
Add test for throwing errors from catch clauses
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 1 | ||||
-rw-r--r-- | tests/errors/bug639589.vala | 18 |
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index a36720cb3..63d0c9d65 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -77,6 +77,7 @@ TESTS = \ errors/bug579101.vala \ errors/bug596228.vala \ errors/bug623049.vala \ + errors/bug639589.vala \ asynchronous/bug595735.vala \ asynchronous/bug595755.vala \ asynchronous/bug596177.vala \ diff --git a/tests/errors/bug639589.vala b/tests/errors/bug639589.vala new file mode 100644 index 000000000..a88bb0a4b --- /dev/null +++ b/tests/errors/bug639589.vala @@ -0,0 +1,18 @@ +void foo () throws Error { + var bar = new Object (); + try + { + throw new FileError.EXIST (""); + } catch (Error e) { + throw e; + } finally { + bar.set_data ("foo", "bar"); + } +} + +void main() { + try { + foo (); + } catch (Error e) { + } +} |