summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2023-08-01 03:04:42 +0900
committerNobuyoshi Nakada <[email protected]>2023-09-25 22:57:28 +0900
commitac244938e8b97c8bd42d1dc8ed820091e6ef5537 (patch)
treed31693cc37095ca9f6a21092e8c254273b05915c /error.c
parentacd44902b917230066b4fc7ea6c7e12556274512 (diff)
Dump backtraces to an arbitrary stream
Diffstat (limited to 'error.c')
-rw-r--r--error.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/error.c b/error.c
index cd031120e2..3aac9a3d87 100644
--- a/error.c
+++ b/error.c
@@ -757,7 +757,7 @@ bug_report_end(FILE *out)
FILE *out = bug_report_file(file, line); \
if (out) { \
bug_report_begin(out, fmt); \
- rb_vm_bugreport(ctx); \
+ rb_vm_bugreport(ctx, out); \
bug_report_end(out); \
} \
} while (0) \
@@ -766,7 +766,7 @@ bug_report_end(FILE *out)
FILE *out = bug_report_file(file, line); \
if (out) { \
bug_report_begin_valist(out, fmt, args); \
- rb_vm_bugreport(ctx); \
+ rb_vm_bugreport(ctx, out); \
bug_report_end(out); \
} \
} while (0) \
@@ -881,7 +881,7 @@ rb_assert_failure(const char *file, int line, const char *name, const char *expr
if (name) fprintf(out, "%s:", name);
fprintf(out, "%s\n%s\n\n", expr, rb_dynamic_description);
preface_dump(out);
- rb_vm_bugreport(NULL);
+ rb_vm_bugreport(NULL, out);
bug_report_end(out);
die();
}
@@ -3256,7 +3256,7 @@ rb_fatal(const char *fmt, ...)
/* The thread has no GVL. Object allocation impossible (cant run GC),
* thus no message can be printed out. */
fprintf(stderr, "[FATAL] rb_fatal() outside of GVL\n");
- rb_print_backtrace();
+ rb_print_backtrace(stderr);
die();
}