errors/catch-in-finally.vala \
errors/catch-no-error-type.test \
errors/default-gtype.vala \
+ errors/delegate-throws-no-error-type.test \
errors/errors.vala \
errors/errorcode.vala \
errors/errordomain.vala \
errors/invalid-type-check.test \
errors/loops.vala \
errors/method-throws.vala \
+ errors/method-throws-no-error-type.test \
errors/unhandled.vala \
errors/bug567181.vala \
errors/bug579101.vala \
--- /dev/null
+Invalid Code
+
+delegate void FooFunc () throws int;
+
+void main () {
+}
--- /dev/null
+Invalid Code
+
+void foo () throws int {
+}
+
+void main () {
+}
if (error_types != null) {
foreach (DataType error_type in error_types) {
+ if (!(error_type is ErrorType)) {
+ error = true;
+ Report.error (error_type.source_reference, "`%s' is not an error type", error_type.to_string ());
+ }
error_type.check (context);
// check whether error type is at least as accessible as the delegate
if (error_types != null) {
foreach (DataType error_type in error_types) {
+ if (!(error_type is ErrorType)) {
+ error = true;
+ Report.error (error_type.source_reference, "`%s' is not an error type", error_type.to_string ());
+ }
error_type.check (context);
// check whether error type is at least as accessible as the method