Branch: Tag:

2017-06-06

2017-06-06 10:34:57 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Runtime: Improved diagnostics in fatal_on_error().

Attempt to format and display the error that causes the fatal.

465:      PMOD_EXPORT void fatal_on_error(const void *msg)   { +  JMP_BUF tmp; +     /* It's ok if we're exiting. */    if (throw_severity == THROW_EXIT) return;   
475:    }   #endif    fprintf(stderr,"%s\n",(char *)msg); +  +  if (SETJMP(tmp)) { +  fprintf(stderr, "Error in handle_error().\n"); +  } else { +  call_handle_error(); +  } +  UNSETJMP(tmp); +     do_abort();   }