Last change
on this file was
2629,
checked in by jderouillat, 7 weeks 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
|
Line | |
---|
1 | #include "exception.hpp" |
---|
2 | |
---|
3 | /// boost headers /// |
---|
4 | #include "client.hpp" |
---|
5 | #include "server.hpp" |
---|
6 | #include "log.hpp" |
---|
7 | |
---|
8 | namespace xios |
---|
9 | { |
---|
10 | /// ////////////////////// Définitions ////////////////////// /// |
---|
11 | CException::CException(void) |
---|
12 | : CObject(), desc_rethrow(true), stream() |
---|
13 | { /* Ne rien faire de plus */ } |
---|
14 | |
---|
15 | CException::CException(const std::string & id) |
---|
16 | : CObject(id), desc_rethrow(true), stream() |
---|
17 | { /* Ne rien faire de plus */ } |
---|
18 | |
---|
19 | CException::CException(const CException & exception) |
---|
20 | // : std::basic_ios<char>() |
---|
21 | : CObject(exception.getId()) |
---|
22 | // , StdOStringStream() |
---|
23 | // , desc_rethrow(false) |
---|
24 | { (*this) << exception.str(); } |
---|
25 | |
---|
26 | CException::~CException(void) |
---|
27 | { |
---|
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 |
---|
40 | } |
---|
41 | |
---|
42 | //--------------------------------------------------------------- |
---|
43 | |
---|
44 | std::string CException::getMessage(void) const |
---|
45 | { |
---|
46 | // StdOStringStream oss; |
---|
47 | // oss << "> Error [" << this->getId() << "] : " << this->str(); |
---|
48 | // return (oss.str()); |
---|
49 | return (stream.str()); |
---|
50 | } |
---|
51 | |
---|
52 | StdOStringStream & CException::getStream(void) |
---|
53 | { return stream; } |
---|
54 | |
---|
55 | std::string CException::toString(void) const |
---|
56 | // { return (std::string(this->getMessage())); } |
---|
57 | { return stream.str(); } |
---|
58 | |
---|
59 | void CException::fromString(const std::string & str) |
---|
60 | { } |
---|
61 | // { this->str(str); } |
---|
62 | |
---|
63 | //--------------------------------------------------------------- |
---|
64 | |
---|
65 | } // namespace xios |
---|
Note: See
TracBrowser
for help on using the repository browser.