summaryrefslogtreecommitdiff
path: root/vala/valatrystatement.vala
diff options
context:
space:
mode:
Diffstat (limited to 'vala/valatrystatement.vala')
-rw-r--r--vala/valatrystatement.vala6
1 files changed, 6 insertions, 0 deletions
diff --git a/vala/valatrystatement.vala b/vala/valatrystatement.vala
index 38000f516..7e82228a5 100644
--- a/vala/valatrystatement.vala
+++ b/vala/valatrystatement.vala
@@ -111,6 +111,12 @@ public class Vala.TryStatement : CodeNode, Statement {
checked = true;
+ if (context.profile == Profile.POSIX) {
+ Report.error (source_reference, "`try' is not supported in POSIX profile");
+ error = true;
+ return false;
+ }
+
body.check (context);
var error_types = new ArrayList<DataType> ();