Main Page | Modules | Files | Functions | Code Elements | Data Structures | Deprecated

tc/emh.h

Go to the documentation of this file.
00001 /*==============================================================================
00002                 Copyright (c) 2003-2005 UGS Corporation
00003                    Unpublished - All Rights Reserved
00004  ==============================================================================*/
00005 
00012 /*  */
00013 
00014 #ifndef EMH_H
00015 #define EMH_H
00016 
00017 #include <tc/tc_startup.h>
00018 
00019 #define EMH_severity_information    1
00020 #define EMH_severity_warning        2
00021 #define EMH_severity_error          3
00022 #define EMH_severity_user_error     4
00023 
00024 #include <tc/libtc_exports.h>
00025 
00026 #ifdef __cplusplus
00027     extern "C"{
00028 #endif
00029 
00034 #define EMH_WARNING                     1
00035 #define EMH_SERIOUS                     2
00036 #define EMH_FATAL                       3
00037 
00040 #define EMH_MAXEMSG                     1024
00041 
00119 extern TC_API int EMH_store_error(
00120     int             severity,  
00121     int             ifail      
00122     );
00123 
00130 extern TC_API int EMH_store_error_s1(
00131     int             severity,  
00132     int             ifail,     
00133     const char*     s1         
00135     );
00136 
00143 extern TC_API int EMH_store_error_s2(
00144     int             severity,  
00145     int             ifail,     
00146     const char*     s1,        
00148     const char*     s2         
00150     );
00151 
00158 extern TC_API int EMH_store_error_s3(
00159     int             severity,  
00160     int             ifail,     
00161     const char*     s1,        
00163     const char*     s2,        
00165     const char*     s3         
00167     );
00168 
00175 extern TC_API int EMH_store_error_s4(
00176     int             severity,  
00177     int             ifail,     
00178     const char*     s1,        
00180     const char*     s2,        
00182     const char*     s3,        
00184     const char*     s4         
00186     );
00187 
00194 extern TC_API int EMH_store_error_s5(
00195     int             severity,  
00196     int             ifail,     
00197     const char*     s1,        
00199     const char*     s2,        
00201     const char*     s3,        
00203     const char*     s4,        
00205     const char*     s5         
00207     );
00208 
00215 extern TC_API int EMH_store_error_s7(
00216     int             severity,  
00217     int             ifail,     
00218     const char*     s1,        
00220     const char*     s2,        
00222     const char*     s3,        
00224     const char*     s4,        
00226     const char*     s5,         
00228     const char*     s6,        
00230     const char*     s7         
00232     );
00233 
00238 extern TC_API int EMH_store_initial_error(
00239     int             severity,  
00240     int             ifail      
00241     );
00242 
00250 extern TC_API int EMH_store_initial_error_s1(
00251     int             severity,  
00252     int             ifail,     
00253     const char*     s1         
00255     );
00256 
00264 extern TC_API int EMH_store_initial_error_s2(
00265     int             severity,  
00266     int             ifail,     
00267     const char*     s1,        
00269     const char*     s2         
00271     );
00272 
00280 extern TC_API int EMH_store_initial_error_s3(
00281     int             severity,  
00282     int             ifail,     
00283     const char*     s1,        
00285     const char*     s2,        
00287     const char*     s3         
00289     );
00290 
00298 extern TC_API int EMH_store_initial_error_s4(
00299     int             severity,  
00300     int             ifail,     
00301     const char*     s1,        
00303     const char*     s2,        
00305     const char*     s3,        
00307     const char*     s4         
00309     );
00310 
00318 extern TC_API int EMH_store_initial_error_s5(
00319     int             severity,  
00320     int             ifail,     
00321     const char*     s1,        
00323     const char*     s2,        
00325     const char*     s3,        
00327     const char*     s4,        
00329     const char*     s5         
00331     );
00332 
00340 extern TC_API int EMH_ask_last_error(
00341     int*            ifail  
00342     );
00343 
00353 extern TC_API int EMH_ask_errors(
00354     int*            n_ifails,      
00355     const int**     severities,    
00356     const int**     ifails,        
00357     const char***   texts          
00358     );
00359 
00366 extern TC_API int EMH_clear_errors( void );
00367 
00374 extern TC_API int EMH_clear_last_error(
00375     int             ifail  
00376     );
00377 
00400 extern TC_API int EMH_set_protect_mark(
00401     int*            mark   
00402     );
00403 
00404 extern TC_API int EMH_clear_protect_mark(
00405     int             mark   
00406     );
00407 
00417 extern TC_API int EMH_ask_error_text(
00418     int             ifail,     
00419     char**          text       
00420     );
00421 
00434 extern TC_API int EMH_get_error_string(
00435     tag_t           tag,    
00436     int             ifail,  
00437     char**          text    
00438     );
00439 
00442 #ifdef __cplusplus
00443 }
00444 #endif
00445 
00446 #define EMH_MAX_NUM_EMSG 100
00447 
00448 #ifdef __cplusplus
00449     extern "C"{
00450 #endif
00451 
00472 extern TC_API int EMH_get_error_codes(
00473     tag_t           tag,            
00474     int             index_name,     
00475     int             max,            
00476     int*            codes           
00477     );
00478 
00492 extern TC_API int EMH_get_error_text(
00493     tag_t           tag,            
00494     int             index_name,     
00495     int             max,            
00496     char*           msgs[]          
00497     );
00498 
00502 extern TC_API int EMH_catch_ifail(
00503     int             ifail   
00504     );
00505 
00509 extern TC_API int EMH_ask_initial_traceback (
00510     const char *separator,      
00511     char **traceback            
00512     );
00513 
00517 extern TC_API void EMH_clear_initial_traceback(void);
00518 
00519 
00523 extern TC_API void EMH_capture_initial_traceback(void);
00524 
00525 
00529 extern TC_API void EMH_close_error_text_file(void);
00530 
00531 
00535 extern TC_API char* EMH_ask_system_log( void );
00536 
00539 #ifdef __cplusplus
00540 }
00541 #endif
00542 
00543 #include <tc/libtc_undef.h>
00544 
00545 #endif