1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00

don't print stack trace for a fatal error. Only a segfault

This commit is contained in:
Charles Lowell 2010-05-23 04:01:08 +03:00
parent e509bebe05
commit 99faaad1be

View file

@ -8,13 +8,10 @@ namespace {
static void* stack[20];
void fatal(const char* location, const char* message) {
int size = backtrace(stack, 20);
backtrace_symbols_fd(stack, size, 2);
rb_raise(rb_eFatal, "%s: %s", location, message);
}
void segfault(int sig) {
fprintf(stderr, "segfault: game over.\n");
void *elements[20];
int size = backtrace(stack, 20);
backtrace_symbols_fd(stack, size, 2);
exit(1);