tesseract  3.04.00
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
danerror.cpp File Reference
#include "host.h"
#include "danerror.h"
#include "tprintf.h"
#include "globaloc.h"
#include <stdio.h>

Go to the source code of this file.

Functions

void DoError (int Error, const char *Message)
 

Function Documentation

void DoError ( int  Error,
const char *  Message 
)

Include Files and Type Defines

Definition at line 32 of file danerror.cpp.

32  {
33 /*
34  ** Parameters:
35  ** Error error number which is to be trapped
36  ** Message pointer to a string to be printed as an error message
37  ** Globals:
38  ** ErrorTrapStack stack of error traps
39  ** CurrentTrapDepth number of traps on the stack
40  ** Operation:
41  ** This routine prints the specified error message to stderr.
42  ** It then jumps to the current error trap. If the error trap
43  ** stack is empty, the calling program is terminated with a
44  ** fatal error message.
45  ** Return:
46  ** None - this routine does not return.
47  ** Exceptions:
48  ** Empty error trap stack terminates the calling program.
49  ** History:
50  ** 4/3/89, DSJ, Created.
51  */
52  if (Message != NULL) {
53  tprintf("\nError: %s!\n", Message);
54  }
55 
56  err_exit();
57 } /* DoError */
void err_exit()
Definition: globaloc.cpp:74
#define tprintf(...)
Definition: tprintf.h:31
#define NULL
Definition: host.h:144