Ignore:
Timestamp:
10/09/14 12:28:25 (10 years ago)
Author:
mhnguyen
Message:

Making a minor change of info output

+) Use a more beautiful format for name of info output file
+) Do a same thing to error file

Test
+) On curie
+) Passed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/exception.cpp

    r335 r497  
    33/// boost headers /// 
    44#include <boost/cast.hpp> 
     5#include "client.hpp" 
     6#include "server.hpp" 
     7#include "cxios.hpp" 
    58 
    69namespace xios 
     
    2326 
    2427   CException::~CException(void) 
    25    {  
     28   { 
    2629      if (desc_rethrow) 
    2730#ifdef __XIOS_NOABORT 
    28         throw (*this);  
     31      { 
     32        throw (*this); 
     33      } 
    2934#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); 
    3045      std::cerr << this->getMessage() << std::endl; 
     46      fileStream.close(); 
    3147      abort(); 
     48      } 
     49 
    3250#endif 
    3351   } 
Note: See TracChangeset for help on using the changeset viewer.