diff options
author | Sverker Eriksson <[email protected]> | 2011-04-27 18:02:08 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2011-04-27 18:02:08 +0200 |
commit | 317452247f37133f27d9e4e8040269dbccedb268 (patch) | |
tree | dcc8acd50269f4776ba322689268311b7203768a /erts/doc | |
parent | 574de87663ecee7043df1783e7c3b830193b0399 (diff) | |
parent | b02f03c979cda37e43828cd6e1787649f1d8ca8c (diff) | |
download | otp-317452247f37133f27d9e4e8040269dbccedb268.tar.gz otp-317452247f37133f27d9e4e8040269dbccedb268.tar.bz2 otp-317452247f37133f27d9e4e8040269dbccedb268.zip |
Merge branch 'sverker/enif_is_exception/OTP-9150' into dev
* sverker/enif_is_exception/OTP-9150:
add support for checking if an ERL_NIF_TERM is an exception
Diffstat (limited to 'erts/doc')
-rw-r--r-- | erts/doc/src/erl_nif.xml | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 4bbd4e2a54..cdce4ec0b8 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -688,6 +688,10 @@ typedef enum { <fsummary>Determine if a term is an empty list</fsummary> <desc><p>Return true if <c>term</c> is an empty list.</p></desc> </func> + <marker id="enif_is_exception"/><func><name><ret>int</ret><nametext>enif_is_exception(ErlNifEnv* env, ERL_NIF_TERM term)</nametext></name> + <fsummary>Determine if a term is an exception</fsummary> + <desc><p>Return true if <c>term</c> is an exception.</p></desc> + </func> <func><name><ret>int</ret><nametext>enif_is_fun(ErlNifEnv* env, ERL_NIF_TERM term)</nametext></name> <fsummary>Determine if a term is a fun</fsummary> <desc><p>Return true if <c>term</c> is a fun.</p></desc> @@ -738,7 +742,14 @@ typedef enum { </func> <func><name><ret>ERL_NIF_TERM</ret><nametext>enif_make_badarg(ErlNifEnv* env)</nametext></name> <fsummary>Make a badarg exception.</fsummary> - <desc><p>Make a badarg exception to be returned from a NIF.</p></desc> + <desc><p>Make a badarg exception to be returned from a NIF, and set + an associated exception reason in <c>env</c>. If + <c>enif_make_badarg</c> is called, the term it returns <em>must</em> + be returned from the function that called it. No other return value + is allowed. Also, the term returned from <c>enif_make_badarg</c> may + be passed only to + <seealso marker="#enif_is_exception">enif_is_exception</seealso> and + not to any other NIF API function.</p></desc> </func> <func><name><ret>ERL_NIF_TERM</ret><nametext>enif_make_binary(ErlNifEnv* env, ErlNifBinary* bin)</nametext></name> <fsummary>Make a binary term.</fsummary> |