aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/doc/src
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2013-09-24 10:28:16 +0200
committerBjörn Gustavsson <[email protected]>2013-09-27 10:44:49 +0200
commit0f430abcb189988a7faf55386557b2b74afa6f56 (patch)
tree71915a21f54b442c32fcfbc880872cc7c98b6561 /lib/asn1/doc/src
parente5210c4bc75f561383ec4f94e3dce15440f1c269 (diff)
downloadotp-0f430abcb189988a7faf55386557b2b74afa6f56.tar.gz
otp-0f430abcb189988a7faf55386557b2b74afa6f56.tar.bz2
otp-0f430abcb189988a7faf55386557b2b74afa6f56.zip
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.
Diffstat (limited to 'lib/asn1/doc/src')
-rw-r--r--lib/asn1/doc/src/asn1ct.xml9
1 files changed, 8 insertions, 1 deletions
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 @@
<v>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</v>
<v>OldOption = ber | per</v>
<v>Reason = term()</v>
@@ -238,6 +238,13 @@ File3.asn </pre>
list or a binary. Earlier versions of the compiler ignored
those following bytes.</p>
</item>
+ <tag><c>no_ok_wrapper</c></tag>
+ <item>
+ <p>If this option is given, the generated <c>encode/2</c>
+ and <c>decode/2</c> functions will not wrap a successful
+ return value in an <c>{ok,...}</c> tuple. If any error
+ occurs, there will be an exception.</p>
+ </item>
<tag><c>{macro_name_prefix, Prefix}</c></tag>
<item>
<p>All macro names generated by the compiler are prefixed with