diff options
author | Björn Gustavsson <[email protected]> | 2013-07-10 15:55:17 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2013-08-30 10:13:17 +0200 |
commit | 6b4c51b72dd5b17c26c624f09e88e038d7edfcb5 (patch) | |
tree | 4fcc17011d86f857be67a21a64a14ac545e2a4bd /lib/asn1/src/asn1ct_gen_per.erl | |
parent | 8fb5a3b6241a988c80dc1faac9bfb396c1aa32b7 (diff) | |
download | otp-6b4c51b72dd5b17c26c624f09e88e038d7edfcb5.tar.gz otp-6b4c51b72dd5b17c26c624f09e88e038d7edfcb5.tar.bz2 otp-6b4c51b72dd5b17c26c624f09e88e038d7edfcb5.zip |
Clean up checking of objects
Diffstat (limited to 'lib/asn1/src/asn1ct_gen_per.erl')
-rw-r--r-- | lib/asn1/src/asn1ct_gen_per.erl | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/asn1/src/asn1ct_gen_per.erl b/lib/asn1/src/asn1ct_gen_per.erl index aefcdfecc8..588e03f432 100644 --- a/lib/asn1/src/asn1ct_gen_per.erl +++ b/lib/asn1/src/asn1ct_gen_per.erl @@ -295,9 +295,6 @@ gen_encode_objectfields(Erule, ClassName, % ", Val, _RestPrimFieldName) ->",nl]), MaybeConstr = case {get_object_field(Name,ObjectFields),OptOrMand} of - {false,'MANDATORY'} -> %% this case is illegal - exit({error,{asn1,{"missing mandatory field in object", - ObjName}}}); {false,'OPTIONAL'} -> EmitFuncClause("Val"), case Erule of @@ -341,9 +338,6 @@ gen_encode_objectfields(Erule,ClassName,[{objectfield,Name,_,_,OptOrMand}|Rest], % emit(["'enc_",ObjName,"'(",{asis,Name}, % ", Val,[H|T]) ->",nl]), case {get_object_field(Name,ObjectFields),OptOrMand} of - {false,'MANDATORY'} -> - exit({error,{asn1,{"missing mandatory field in object", - ObjName}}}); {false,'OPTIONAL'} -> EmitFuncClause("_,_"), emit([" exit({error,{'use of missing field in object', ",{asis,Name}, @@ -459,9 +453,6 @@ gen_decode_objectfields(Erules, ClassName, end, MaybeConstr= case {get_object_field(Name,ObjectFields),OptOrMand} of - {false,'MANDATORY'} -> %% this case is illegal - exit({error,{asn1,{"missing mandatory field in object", - ObjName}}}); {false,'OPTIONAL'} -> EmitFuncClause("Bytes"), emit([" {Bytes,[]}"]), @@ -496,9 +487,6 @@ gen_decode_objectfields(Erules, ClassName, % emit(["'dec_",ObjName,"'(",{asis,Name}, % ", Bytes,_,[H|T]) ->",nl]), case {get_object_field(Name,ObjectFields),OptOrMand} of - {false,'MANDATORY'} -> - exit({error,{asn1,{"missing mandatory field in object", - ObjName}}}); {false,'OPTIONAL'} -> EmitFuncClause("_,_,_"), emit([" exit({error,{'illegal use of missing field in object', ",{asis,Name}, |