84 |
msg[p++] = '\n'; |
msg[p++] = '\n'; |
85 |
msg[p++] = '\0'; |
msg[p++] = '\0'; |
86 |
|
|
|
/* |
|
|
Ensure that our messages don't get left in the GUI |
|
|
that is about to vanish... |
|
|
*/ |
|
|
error_reporter_set_callback(NULL); |
|
|
|
|
|
/* Print the message to the default error reporter (ASCERR) */ |
|
|
fprintf(stderr,"\n\n"); |
|
|
ERROR_REPORTER_NOLINE(ASC_PROG_FATAL,msg); |
|
87 |
|
|
88 |
/* |
/* |
89 |
Write the message to g_panic_outfile if it is not empty |
Write the message to g_panic_outfile if it is not empty |
100 |
fclose(outfile); |
fclose(outfile); |
101 |
} |
} |
102 |
|
|
103 |
/* Call the registered callback function, if any. */ |
if (NULL == f_panic_callback_func) { |
104 |
if (NULL != f_panic_callback_func) { |
/* if there is no callback function registered, reset the error handler, and |
105 |
|
output the message to the console. |
106 |
|
*/ |
107 |
|
|
108 |
|
/* |
109 |
|
Ensure that our messages don't get left in the GUI |
110 |
|
that is about to vanish... |
111 |
|
*/ |
112 |
|
error_reporter_set_callback(NULL); |
113 |
|
|
114 |
|
/* Print the message to the default error reporter (ASCERR) */ |
115 |
|
fprintf(stderr,"\n\n"); |
116 |
|
ERROR_REPORTER_NOLINE(ASC_PROG_FATAL,msg); |
117 |
|
|
118 |
|
|
119 |
|
}else{ |
120 |
|
/* just use the callback, don't make any output */ |
121 |
|
|
122 |
cancel = (*f_panic_callback_func)(status); |
cancel = (*f_panic_callback_func)(status); |
123 |
if(cancel){ |
if(cancel){ |
124 |
ERROR_REPORTER_HERE(ASC_PROG_ERR, |
ERROR_REPORTER_HERE(ASC_PROG_ERR, |