summaryrefslogtreecommitdiffstats
path: root/byterun/fail.c
diff options
context:
space:
mode:
Diffstat (limited to 'byterun/fail.c')
-rw-r--r--byterun/fail.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/byterun/fail.c b/byterun/fail.c
index a36b6afb4..b1a08c611 100644
--- a/byterun/fail.c
+++ b/byterun/fail.c
@@ -60,6 +60,21 @@ CAMLexport void caml_raise_with_arg(value tag, value arg)
CAMLnoreturn;
}
+CAMLexport void caml_raise_with_args(value tag, int nargs, value args[])
+{
+ CAMLparam1 (tag);
+ CAMLxparamN (args, nargs);
+ value bucket;
+ int i;
+
+ Assert(1 + nargs <= Max_young_wosize);
+ bucket = caml_alloc_small (1 + nargs, 0);
+ Field(bucket, 0) = tag;
+ for (i = 0; i < nargs; i++) Field(bucket, 1 + i) = args[i];
+ caml_raise(bucket);
+ CAMLnoreturn;
+}
+
CAMLexport void caml_raise_with_string(value tag, char const *msg)
{
CAMLparam1 (tag);