ITK Function Reference

(V10000.1.0.60_20160308.00)
error_c_cxx_interface.h
Go to the documentation of this file.
1 /*HEAD ERROR_C_CXX_INTERFACE HHH SYSS */
2 /*===============================================================================
3 
4  Copyright (c) 2003-2004 UGS Corp.
5  Unpublished - All rights reserved
6 
7 =================================================================================
8 File description:
9 
10  This header file serves the purpose of providing an interface between the
11  Error_Exception.hxx header file and *.c file that may include it. The
12  reason for this is primarily for QAZ so that *.c files that need to include
13  Error_Exception.hxx will pass QAZ.
14 
15  So, if __lint is not defined, this header simply includes Error_Exception.hxx
16  if the C++ compiler is active.
17 
18  If __lint is defined, than this header re-defines all the macros from
19  Error_Exception.hxx that *.c files make use of. Since some of those macros
20  represent what use to be functions that can now only be used in an
21  ERROR_PROTECT block, those are defined as function pointers within the
22  ERROR_PROTECT block so that QAZ will generate an error if it encounters a
23  function like ERROR_reraise outside of an ERROR_PROTECT block.
24 
25 =================================================================================
26  Date Name Description of Change
27 NX3
28 02-Jul-2003 Lavarini Split from error.h
29 04-Sep-2003 Jack Marr Add qaz pragmas to flag bad calls
30 30-Sep-2003 Lavarini ERROR_ask_last_error() is a function that can
31  be called from anywhere
32 07-Oct-2003 Lavarini Add param.h to pragma
33 17-Oct-2003 Lavarini Add error_finally.h to pragma
34 27-Oct-2003 Lavarini Add more enquiry functions for last failure
35 17-Nov-2004 Jack Marr Fix redefinition error due to __lint block
36 03-Dec-2004 Lavarini Convert ERROR functions to macros
37 $HISTORY$
38 ===============================================================================*/
39 
40 #ifndef ERROR_C_CXX_INTERFACE_H_INCLUDED
41 #define ERROR_C_CXX_INTERFACE_H_INCLUDED
42 
43 #ifdef __lint
44 # pragma uginclude only_in_error "abort.h","error_protect.h","error_top.h",\
45  "error_escape.h","error_uf_protect.h",\
46  "ui_dispatch.h","frust_protect.h","param.h",\
47  "error_finally.h";
48 #endif
49 
50 #include <error_datatypes.h>
51 #include <libsyss_exports.h>
52 
53 // The C++ header file is only included if the file being compile is
54 // using the C++ compiler. This was done specifically so that om.h
55 // could continue to include error.h and rm_entity_tables.c will compile.
56 #if defined(__cplusplus)
57 # include <Error_Exception.hxx>
58 #endif
59 
60 // Determine if the last exception is a valid failure exception.
61 // This function will return false if an exception has not yet been thrown, or
62 // if the last exception was an Escape exception. This function will return
63 // true otherwise.
64 extern SYSSEXPORT logical ERROR_is_last_failure ( void );
65 
66 // Return the error code of the last exception that was thrown.
67 // This function will raise an Internal exception if an exception has not yet
68 // been thrown, or if the last exception was an Escape exception.
69 extern SYSSEXPORT int ERROR_ask_last_failure_code ( void );
70 
71 // Determine if the last exception has been acknowledged.
72 // This function will raise an Internal exception if an exception has not yet
73 // been thrown, or if the last exception was an Escape exception.
74 extern SYSSEXPORT logical ERROR_is_last_failure_acknowledged ( void );
75 
76 // Return information pertaining to the last exception that was thrown.
77 // This function will raise an Internal exception if an exception has not yet
78 // been thrown, or if the last exception was an Escape exception.
79 extern SYSSEXPORT void ERROR_ask_last_error (
80  char filename[257], // <O>
81  // Name of file where the exception was thrown.
82  int *line_number, // <O>
83  // Line number in file where exception was thrown.
84  char message[1024] // <O>
85  // The message that was written to the syslog when
86  // the exception was thrown.
87 );
88 
89 #undef EXPORTLIBRARY
90 
91 #endif /* ERROR_C_CXX_INTERFACE_H_INCLUDED */