~vcs-imports/tesseract-ocr/trunk

« back to all changes in this revision

Viewing changes to ccutil/errcode.cpp

  • Committer: theraysmith
  • Date: 2008-12-30 18:20:15 UTC
  • Revision ID: svn-v4:d0cd1f9f-072b-0410-8dd7-cf729c803f20:trunk:209
Harmless improvements from 3.00 going in to 2.04

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
 
32
32
const ERRCODE BADERRACTION = "Illegal error action";
33
33
#define MAX_MSG       1024
34
 
extern inT16 global_abort_code;
35
34
 
36
35
/**********************************************************************
37
36
 * error
76
75
                                 //no specific
77
76
    msgptr += sprintf (msgptr, "\n");
78
77
 
79
 
  tprintf(msg);
80
 
  if ((strstr (message, "File") != NULL) ||
 
78
  fprintf(stderr, msg);
 
79
  /*if ((strstr (message, "File") != NULL) ||
81
80
    (strstr (message, "file") != NULL))
82
 
    global_abort_code = FILE_ABORT;
83
81
  else if ((strstr (message, "List") != NULL) ||
84
82
    (strstr (message, "list") != NULL))
85
 
    global_abort_code = LIST_ABORT;
86
83
  else if ((strstr (message, "Memory") != NULL) ||
87
84
    (strstr (message, "memory") != NULL))
88
85
    global_abort_code = MEMORY_ABORT;
89
86
  else
90
87
    global_abort_code = NO_ABORT_CODE;
 
88
    */
91
89
 
 
90
  int* p = NULL;
92
91
  switch (action) {
93
92
    case DBG:
94
93
    case TESSLOG:
95
94
      return;                    //report only
96
95
    case EXIT:
97
 
      err_exit();
 
96
      //err_exit();
98
97
    case ABORT:
99
 
      abort();
 
98
      // Create a deliberate segv as the stack trace is more useful that way.
 
99
      if (!*p)
 
100
        abort();
100
101
    default:
101
102
      BADERRACTION.error ("error", ABORT, NULL);
102
103
  }