Last change
on this file since 2633 was
2629,
checked in by jderouillat, 2 months ago
|
Delete boost dependencies, the few features used are replaced by functions stored in extern/boost_extraction
|
-
Property copyright set to
Software name : XIOS (Xml I/O Server) http://forge.ipsl.jussieu.fr/ioserver Creation date : January 2009 Licence : CeCCIL version2 see license file in root directory : Licence_CeCILL_V2-en.txt or http://www.cecill.info/licences/Licence_CeCILL_V2-en.html Holder : CEA/LSCE (Laboratoire des Sciences du CLimat et de l'Environnement) CNRS/IPSL (Institut Pierre Simon Laplace) Project Manager : Yann Meurdesoif yann.meurdesoif@cea.fr
|
File size:
1.6 KB
|
Rev | Line | |
---|
[219] | 1 | #include "exception.hpp" |
---|
| 2 | |
---|
| 3 | /// boost headers /// |
---|
[497] | 4 | #include "client.hpp" |
---|
| 5 | #include "server.hpp" |
---|
[523] | 6 | #include "log.hpp" |
---|
[219] | 7 | |
---|
[335] | 8 | namespace xios |
---|
[219] | 9 | { |
---|
| 10 | /// ////////////////////// Définitions ////////////////////// /// |
---|
| 11 | CException::CException(void) |
---|
[1622] | 12 | : CObject(), desc_rethrow(true), stream() |
---|
[219] | 13 | { /* Ne rien faire de plus */ } |
---|
| 14 | |
---|
[1622] | 15 | CException::CException(const std::string & id) |
---|
| 16 | : CObject(id), desc_rethrow(true), stream() |
---|
[219] | 17 | { /* Ne rien faire de plus */ } |
---|
| 18 | |
---|
| 19 | CException::CException(const CException & exception) |
---|
[1622] | 20 | // : std::basic_ios<char>() |
---|
| 21 | : CObject(exception.getId()) |
---|
| 22 | // , StdOStringStream() |
---|
| 23 | // , desc_rethrow(false) |
---|
[219] | 24 | { (*this) << exception.str(); } |
---|
| 25 | |
---|
| 26 | CException::~CException(void) |
---|
[497] | 27 | { |
---|
[1622] | 28 | // if (desc_rethrow) |
---|
| 29 | //#ifdef __XIOS_NOABORT |
---|
| 30 | // { |
---|
| 31 | // throw (*this); |
---|
| 32 | // } |
---|
| 33 | //#else |
---|
| 34 | // { |
---|
| 35 | // error << this->getMessage() << std::endl; |
---|
| 36 | // throw 4; |
---|
| 37 | // MPI_Abort(CXios::globalComm, -1); //abort(); |
---|
| 38 | // } |
---|
| 39 | //#endif |
---|
[278] | 40 | } |
---|
[219] | 41 | |
---|
| 42 | //--------------------------------------------------------------- |
---|
| 43 | |
---|
[1622] | 44 | std::string CException::getMessage(void) const |
---|
[219] | 45 | { |
---|
[1622] | 46 | // StdOStringStream oss; |
---|
| 47 | // oss << "> Error [" << this->getId() << "] : " << this->str(); |
---|
| 48 | // return (oss.str()); |
---|
| 49 | return (stream.str()); |
---|
[219] | 50 | } |
---|
| 51 | |
---|
| 52 | StdOStringStream & CException::getStream(void) |
---|
[1622] | 53 | { return stream; } |
---|
[219] | 54 | |
---|
[1622] | 55 | std::string CException::toString(void) const |
---|
| 56 | // { return (std::string(this->getMessage())); } |
---|
| 57 | { return stream.str(); } |
---|
[219] | 58 | |
---|
[1622] | 59 | void CException::fromString(const std::string & str) |
---|
| 60 | { } |
---|
| 61 | // { this->str(str); } |
---|
[219] | 62 | |
---|
| 63 | //--------------------------------------------------------------- |
---|
| 64 | |
---|
[335] | 65 | } // namespace xios |
---|
Note: See
TracBrowser
for help on using the repository browser.