summaryrefslogtreecommitdiffstats
path: root/asmrun/fail.c
diff options
context:
space:
mode:
Diffstat (limited to 'asmrun/fail.c')
-rw-r--r--asmrun/fail.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/asmrun/fail.c b/asmrun/fail.c
index a63a09ca0..cb2c1cbd7 100644
--- a/asmrun/fail.c
+++ b/asmrun/fail.c
@@ -104,7 +104,10 @@ void caml_raise_with_args(value tag, int nargs, value args[])
void caml_raise_with_string(value tag, char const *msg)
{
- caml_raise_with_arg(tag, caml_copy_string(msg));
+ CAMLparam1(tag);
+ value v_msg = caml_copy_string(msg);
+ caml_raise_with_arg(tag, v_msg);
+ CAMLnoreturn;
}
void caml_failwith (char const *msg)
@@ -161,9 +164,11 @@ static value * caml_array_bound_error_exn = NULL;
void caml_array_bound_error(void)
{
if (caml_array_bound_error_exn == NULL) {
- caml_array_bound_error_exn = caml_named_value("Pervasives.array_bound_error");
+ caml_array_bound_error_exn =
+ caml_named_value("Pervasives.array_bound_error");
if (caml_array_bound_error_exn == NULL) {
- fprintf(stderr, "Fatal error: exception Invalid_argument(\"index out of bounds\")\n");
+ fprintf(stderr, "Fatal error: exception "
+ "Invalid_argument(\"index out of bounds\")\n");
exit(2);
}
}