From 76075cb862d629a9624ab4db98ff876e261fc796 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Fri, 28 Nov 2014 10:58:47 +0100 Subject: Clean up get_unique_fieldname/2 get_unique_fieldname/2 would throw an exception that *all* callers would catch and handle. Since all callers catch the exception, it is much easier to return a special return value. Also use the new error reporting style. While we are at it, remove all catches of {asn1,Error} which are no longer thrown. --- lib/asn1/test/error_SUITE.erl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/asn1/test/error_SUITE.erl') diff --git a/lib/asn1/test/error_SUITE.erl b/lib/asn1/test/error_SUITE.erl index 83ef5f226e..eec0d1e195 100644 --- a/lib/asn1/test/error_SUITE.erl +++ b/lib/asn1/test/error_SUITE.erl @@ -339,9 +339,13 @@ object_sets(Config) -> "TEST-UNIQ ::= CLASS { &id INTEGER UNIQUE, &test INTEGER }\n" "UniqSet TEST-UNIQ ::= { { &id 1, &test 1 } | {&id 1, &test 2} }\n" + "DOUBLE-UNIQ ::= CLASS { &id1 INTEGER UNIQUE," + " &id INTEGER UNIQUE }\n" + "DoubleSet DOUBLE-UNIQ ::= { {&id1 1, &id2 2} }\n" "END\n">>}, {error, - [{structured_error,{M,3},asn1ct_check,{non_unique_object,1}} + [{structured_error,{M,3},asn1ct_check,{non_unique_object,1}}, + {structured_error,{M,5},asn1ct_check,multiple_uniqs} ] } = run(P, Config), ok. -- cgit v1.2.3