aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_nif.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2011-04-27 18:02:08 +0200
committerSverker Eriksson <[email protected]>2011-04-27 18:02:08 +0200
commit317452247f37133f27d9e4e8040269dbccedb268 (patch)
treedcc8acd50269f4776ba322689268311b7203768a /erts/emulator/beam/erl_nif.c
parent574de87663ecee7043df1783e7c3b830193b0399 (diff)
parentb02f03c979cda37e43828cd6e1787649f1d8ca8c (diff)
downloadotp-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/emulator/beam/erl_nif.c')
-rw-r--r--erts/emulator/beam/erl_nif.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c
index 135c6b0ccc..8b48444904 100644
--- a/erts/emulator/beam/erl_nif.c
+++ b/erts/emulator/beam/erl_nif.c
@@ -430,6 +430,11 @@ int enif_is_list(ErlNifEnv* env, ERL_NIF_TERM term)
return is_list(term) || is_nil(term);
}
+int enif_is_exception(ErlNifEnv* env, ERL_NIF_TERM term)
+{
+ return term == THE_NON_VALUE;
+}
+
static void aligned_binary_dtor(struct enif_tmp_obj_t* obj)
{
erts_free_aligned_binary_bytes_extra((byte*)obj,ERTS_ALC_T_TMP);