Changeset 497 for XIOS/trunk/src/exception.cpp
- Timestamp:
- 10/09/14 12:28:25 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/exception.cpp
r335 r497 3 3 /// boost headers /// 4 4 #include <boost/cast.hpp> 5 #include "client.hpp" 6 #include "server.hpp" 7 #include "cxios.hpp" 5 8 6 9 namespace xios … … 23 26 24 27 CException::~CException(void) 25 { 28 { 26 29 if (desc_rethrow) 27 30 #ifdef __XIOS_NOABORT 28 throw (*this); 31 { 32 throw (*this); 33 } 29 34 #else 35 { 36 StdOFStream fileStream; 37 StdStringStream fileNameErr; 38 std::streambuf* psbuf; 39 if (CXios::isClient) fileNameErr<< CXios::errorFile <<"_client_" << CClient::getRank() << ".err"; 40 else fileNameErr<< CXios::errorFile <<"_server_" << CServer::getRank() << ".err"; 41 42 fileStream.open(fileNameErr.str().c_str(), std::ofstream::out); 43 psbuf = fileStream.rdbuf(); 44 std::cerr.rdbuf(psbuf); 30 45 std::cerr << this->getMessage() << std::endl; 46 fileStream.close(); 31 47 abort(); 48 } 49 32 50 #endif 33 51 }
Note: See TracChangeset
for help on using the changeset viewer.