aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2014-12-01 13:22:47 +0100
committerBjörn Gustavsson <[email protected]>2015-01-12 11:40:29 +0100
commite9b758a50a648e4d0a54963a6530a4b3cb3f68ce (patch)
tree85b9d994d7a475d63981c03329622269a14cd7ff /lib/asn1/src
parent80d35f40a69215cc1a2c883941a7b137a90db725 (diff)
downloadotp-e9b758a50a648e4d0a54963a6530a4b3cb3f68ce.tar.gz
otp-e9b758a50a648e4d0a54963a6530a4b3cb3f68ce.tar.bz2
otp-e9b758a50a648e4d0a54963a6530a4b3cb3f68ce.zip
Modernize error handling for named values
Diffstat (limited to 'lib/asn1/src')
-rw-r--r--lib/asn1/src/asn1ct_check.erl15
1 files changed, 3 insertions, 12 deletions
diff --git a/lib/asn1/src/asn1ct_check.erl b/lib/asn1/src/asn1ct_check.erl
index 19ecd78069..208b4eb180 100644
--- a/lib/asn1/src/asn1ct_check.erl
+++ b/lib/asn1/src/asn1ct_check.erl
@@ -4019,7 +4019,7 @@ update_state(S,ModuleName) ->
get_renamed_reference(S,Name,Module) ->
case renamed_reference(S,Name,Module) of
undefined ->
- throw({error,{asn1,{undefined_type,Name}}});
+ asn1_error(S, {undefined, Name});
NewTypeName when NewTypeName =/= Name ->
get_referenced1(S,Module,NewTypeName,undefined)
end.
@@ -4179,8 +4179,8 @@ check_named_number_list(S, NNL0) ->
asn1_error(S, {namelist_redefinition,H})
end.
-resolve_valueref(S, #'Externalvaluereference'{module=Mod,value=Name}) ->
- dbget_ex(S, Mod, Name);
+resolve_valueref(S, #'Externalvaluereference'{} = T) ->
+ get_referenced_value(S, T);
resolve_valueref(_, Val) when is_integer(Val) ->
Val.
@@ -5731,15 +5731,6 @@ get_taglist1(_S,[]) ->
%% tag_number('CHARACTER STRING') -> 29;
%% tag_number('BMPString') -> 30.
-
-dbget_ex(_S,Module,Key) ->
- case asn1_db:dbget(Module,Key) of
- undefined ->
-
- throw({error,{asn1,{undefined,{Module,Key}}}}); % this is catched on toplevel type or value
- T -> T
- end.
-
merge_tags(T1, T2) when is_list(T2) ->
merge_tags2(T1 ++ T2, []);
merge_tags(T1, T2) ->