aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src/asn1ct_check.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2014-11-28 14:38:38 +0100
committerBjörn Gustavsson <[email protected]>2015-01-12 11:40:28 +0100
commit2a343fda2c75f52bbf35b6d5ca9f3c97037c50b5 (patch)
treecfde8eb2db23200fcdbe1636f54463ddc5f28a07 /lib/asn1/src/asn1ct_check.erl
parent76075cb862d629a9624ab4db98ff876e261fc796 (diff)
downloadotp-2a343fda2c75f52bbf35b6d5ca9f3c97037c50b5.tar.gz
otp-2a343fda2c75f52bbf35b6d5ca9f3c97037c50b5.tar.bz2
otp-2a343fda2c75f52bbf35b6d5ca9f3c97037c50b5.zip
Modernize error handling for instatiation of parameterized types
Diffstat (limited to 'lib/asn1/src/asn1ct_check.erl')
-rw-r--r--lib/asn1/src/asn1ct_check.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/asn1/src/asn1ct_check.erl b/lib/asn1/src/asn1ct_check.erl
index e6e6fa73c1..e926312226 100644
--- a/lib/asn1/src/asn1ct_check.erl
+++ b/lib/asn1/src/asn1ct_check.erl
@@ -3154,8 +3154,8 @@ match_args(S,FA = [FormArg|Ft], AA = [ActArg|At], Acc) ->
end;
match_args(_S,[], [], Acc) ->
lists:reverse(Acc);
-match_args(_,_, _, _) ->
- throw({error,{asn1,{wrong_number_of_arguments}}}).
+match_args(S, _, _, _) ->
+ asn1_error(S, param_wrong_number_of_arguments).
%%%%%%%%%%%%%%%%%
%% categorize_arg(S,FormalArg,ActualArg) -> {FormalArg,CatgorizedActualArg}
@@ -5877,6 +5877,8 @@ format_error(multiple_uniqs) ->
"implementation limitation: only one UNIQUE field is allowed in CLASS";
format_error({namelist_redefinition,Name}) ->
io_lib:format("the name '~s' can not be redefined", [Name]);
+format_error(param_wrong_number_of_arguments) ->
+ "wrong number of arguments";
format_error(reversed_range) ->
"ranges must be given in increasing order";
format_error({syntax_duplicated_fields,Fields}) ->