mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-25 05:27:00 +03:00
Display an error box when exiting due to a SIGFPE or SIGABRT.
svn path=/trunk/netsurf/; revision=3127
This commit is contained in:
parent
f4b8d3a009
commit
3d09fed0af
14
riscos/gui.c
14
riscos/gui.c
@ -771,10 +771,20 @@ void ro_gui_signal(int sig)
|
||||
{
|
||||
struct content *c;
|
||||
void (*prev_handler)(int);
|
||||
static const os_error error = { 1, "NetSurf has detected a serious "
|
||||
"error and must exit. Please submit a bug report, "
|
||||
"attaching the browser log file." };
|
||||
|
||||
if (sig == SIGFPE || sig == SIGABRT) {
|
||||
os_colour old_sand, old_glass;
|
||||
|
||||
xwimp_report_error_by_category(&error,
|
||||
wimp_ERROR_BOX_GIVEN_CATEGORY |
|
||||
wimp_ERROR_BOX_CATEGORY_ERROR <<
|
||||
wimp_ERROR_BOX_CATEGORY_SHIFT,
|
||||
"NetSurf", "!netsurf",
|
||||
(osspriteop_area *) 1, "Quit", 0);
|
||||
xos_cli("Filer_Run <Wimp$ScrapDir>.WWW.NetSurf.Log");
|
||||
xhourglass_on();
|
||||
xhourglass_colours(0x0000ffff, 0x000000ff,
|
||||
&old_sand, &old_glass);
|
||||
@ -784,7 +794,7 @@ void ro_gui_signal(int sig)
|
||||
box_dump(c->data.html.layout, 0);
|
||||
}
|
||||
options_dump();
|
||||
rufl_dump_state();
|
||||
/*rufl_dump_state();*/
|
||||
xhourglass_colours(old_sand, old_glass, 0, 0);
|
||||
xhourglass_off();
|
||||
}
|
||||
@ -2234,6 +2244,8 @@ void die(const char * const error)
|
||||
{
|
||||
os_error warn_error;
|
||||
|
||||
LOG(("%s", error));
|
||||
|
||||
warn_error.errnum = 1; /* \todo: reasonable ? */
|
||||
strncpy(warn_error.errmess, messages_get(error),
|
||||
sizeof(warn_error.errmess)-1);
|
||||
|
Loading…
Reference in New Issue
Block a user