|
Sierra Toolkit
Version of the Day
|
00001 #ifndef STK_UTIL_PARALLEL_ExceptionReport_hpp 00002 #define STK_UTIL_PARALLEL_ExceptionReport_hpp 00003 00004 #include <stk_util/environment/ReportHandler.hpp> 00005 #include <stk_util/environment/RuntimeWarning.hpp> 00006 #include <stk_util/environment/RuntimeDoomed.hpp> 00007 00008 #include <stk_util/util/Fortran.hpp> 00009 #include <stk_util/parallel/Exception.hpp> 00010 00011 00017 #define WarnTrace std::string(std::string(" warning at ") + stk_classic::source_relative_path(STR_TRACE)) 00018 00024 #define ErrorTrace std::string(std::string(" error thrown from ") + stk_classic::source_relative_path(STR_TRACE)) 00025 00026 namespace sierra { 00027 00028 enum ErrorDieEnum{DIE_ON_WARN=0, DIE_ON_ERROR=1, DIE_ON_MESSAGE=2}; 00029 00030 typedef stk_classic::MessageCode MessageCode; 00031 00032 typedef stk_classic::RuntimeWarningAdHoc RuntimeWarning; 00033 typedef stk_classic::RuntimeWarningSymmetric RuntimeWarningP0; 00034 00035 typedef stk_classic::RuntimeWarningAdHoc RuntimeWarningAdHoc; 00036 typedef stk_classic::RuntimeWarningSymmetric RuntimeWarningSymmetric; 00037 typedef stk_classic::RuntimeWarningDeferred RuntimeWarningDeferred; 00038 00039 typedef stk_classic::RuntimeDoomedAdHoc RuntimeDoomed; 00040 typedef stk_classic::RuntimeDoomedSymmetric RuntimeDoomedP0; 00041 00042 typedef stk_classic::RuntimeDoomedAdHoc RuntimeDoomedAdHoc; 00043 typedef stk_classic::RuntimeDoomedSymmetric RuntimeDoomedSymmetric; 00044 typedef stk_classic::RuntimeDoomedDeferred RuntimeDoomedDeferred; 00045 00046 void set_test_error_messages_file(const std::string &test_error_messages_path); 00047 00048 std::ofstream *get_test_error_messages_file(); 00049 00050 void set_test_error_messages_die_on_first_message(std::vector<ErrorDieEnum> errorTypes); 00051 00052 bool get_test_error_messages_die_on_first_warning(); 00053 bool get_test_error_messages_die_on_first_error(); 00054 00055 00059 00060 } // namespace sierra 00061 00078 extern "C" 00079 void SIERRA_FORTRAN(report_error)(int &int_val, const char *message, const int message_length); 00080 00081 #endif // STK_UTIL_PARALLEL_ExceptionReport_hpp