From 0f430abcb189988a7faf55386557b2b74afa6f56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Tue, 24 Sep 2013 10:28:16 +0200 Subject: Teach the ASN.1 compiler the no_ok_wrapper option Add the no_ok_wrapper option so that the generated M:encode/2 and M:decode/2 functions will not wrap a successful return value in an {ok,...} tuple. Errors will cause exceptions. Eliminating the wrapping tuple allows simpler nesting of calls. --- lib/asn1/doc/src/asn1ct.xml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/asn1/doc/src') diff --git a/lib/asn1/doc/src/asn1ct.xml b/lib/asn1/doc/src/asn1ct.xml index 23d122f69a..fcd77e9dc6 100644 --- a/lib/asn1/doc/src/asn1ct.xml +++ b/lib/asn1/doc/src/asn1ct.xml @@ -66,7 +66,7 @@ Option = ber | per | uper | der | compact_bit_string | legacy_bit_string | noobj | {n2n, EnumTypeName} |{outdir, Dir} | {i, IncludeDir} | - asn1config | undec_rest | + asn1config | undec_rest | no_ok_wrapper | {macro_name_prefix, Prefix} | {record_name_prefix, Prefix} | verbose | warnings_as_errors OldOption = ber | per Reason = term() @@ -238,6 +238,13 @@ File3.asn list or a binary. Earlier versions of the compiler ignored those following bytes.

+ no_ok_wrapper + +

If this option is given, the generated encode/2 + and decode/2 functions will not wrap a successful + return value in an {ok,...} tuple. If any error + occurs, there will be an exception.

+
{macro_name_prefix, Prefix}

All macro names generated by the compiler are prefixed with -- cgit v1.2.3