/[ascend]/trunk/base/generic/utilities/ascPanic.c
ViewVC logotype

Diff of /trunk/base/generic/utilities/ascPanic.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 927 by johnpye, Fri Jun 30 05:30:41 2006 UTC revision 928 by johnpye, Wed Nov 22 10:32:18 2006 UTC
# Line 84  void Asc_Panic(CONST int status, CONST c Line 84  void Asc_Panic(CONST int status, CONST c
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
# Line 109  void Asc_Panic(CONST int status, CONST c Line 100  void Asc_Panic(CONST int status, CONST c
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,

Legend:
Removed from v.927  
changed lines
  Added in v.928

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22