bool add_ellipsis = false;
bool suppress_throws = false;
+ string? error_types = null;
var attributes = get_attributes (symbol);
if (attributes != null) {
if (eval (nv[1]) == "0") {
suppress_throws = true;
}
+ } else if (nv[0] == "error_types") {
+ error_types = eval (nv[1]);
} else if (nv[0] == "no_array_length") {
if (eval (nv[1]) == "1") {
m.no_array_length = true;
}
if (suppress_throws == false && param_is_exception (param)) {
- m.add_error_type (parse_type (param.type));
+ if (error_types == null)
+ m.add_error_type (parse_type (param.type));
continue;
}
last_param = p;
last_param_type = param_type;
}
-
+
+ if (suppress_throws == false && error_types != null) {
+ var type_args = eval (error_types).split (",");
+ foreach (string type_arg in type_args) {
+ m.add_error_type (get_type_from_string (type_arg));
+ }
+ }
+
if (first) {
// no parameters => static method
m.binding = MemberBinding.STATIC;