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:
parent
e509bebe05
commit
99faaad1be
1 changed files with 0 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue