|
Last change
on this file since 3848 was
3848,
checked in by ymipsl, 10 years ago
|
|
Add XIOS in Aquaplanet configuration.
YM
|
|
File size:
1.4 KB
|
| Line | |
|---|
| 1 | #ifndef __XMLIO_CException__ |
|---|
| 2 | #define __XMLIO_CException__ |
|---|
| 3 | |
|---|
| 4 | /// xios headers /// |
|---|
| 5 | #include "xmlioserver_spl.hpp" |
|---|
| 6 | #include "object.hpp" |
|---|
| 7 | |
|---|
| 8 | namespace xios |
|---|
| 9 | { |
|---|
| 10 | /// ////////////////////// Déclarations ////////////////////// /// |
|---|
| 11 | class CException |
|---|
| 12 | : private CObject, public StdOStringStream |
|---|
| 13 | { |
|---|
| 14 | typedef CObject SuperClass; |
|---|
| 15 | |
|---|
| 16 | public : |
|---|
| 17 | |
|---|
| 18 | /// Constructeurs /// |
|---|
| 19 | CException(void); |
|---|
| 20 | explicit CException(const StdString & id); |
|---|
| 21 | CException(const CException & exception); |
|---|
| 22 | CException(const CException * const exception); // Not implemented. |
|---|
| 23 | |
|---|
| 24 | /// Accesseurs /// |
|---|
| 25 | StdString getMessage(void) const; |
|---|
| 26 | StdOStringStream & getStream(void); |
|---|
| 27 | |
|---|
| 28 | /// Destructeur /// |
|---|
| 29 | virtual ~CException(void); |
|---|
| 30 | |
|---|
| 31 | /// Autre /// |
|---|
| 32 | virtual StdString toString(void) const; |
|---|
| 33 | virtual void fromString(const StdString & str); |
|---|
| 34 | |
|---|
| 35 | private : |
|---|
| 36 | |
|---|
| 37 | /// Propriétés /// |
|---|
| 38 | bool desc_rethrow; // throw destructor |
|---|
| 39 | |
|---|
| 40 | }; // CException |
|---|
| 41 | } // namespace xios |
|---|
| 42 | |
|---|
| 43 | /// //////////////////////////// Macros //////////////////////////// /// |
|---|
| 44 | |
|---|
| 45 | #define INFO(x) \ |
|---|
| 46 | "In file \'" __FILE__ "\', line " << __LINE__ << " -> " x << std::endl; |
|---|
| 47 | |
|---|
| 48 | #ifdef __XIOS_DEBUG |
|---|
| 49 | # define DEBUG(x) std::clog << "> Debug " << INFO(x) |
|---|
| 50 | #else |
|---|
| 51 | # define DEBUG(x) |
|---|
| 52 | #endif |
|---|
| 53 | |
|---|
| 54 | #define ERROR(id, x) CException(id).getStream() << INFO(x) |
|---|
| 55 | |
|---|
| 56 | #endif // __XMLIO_CException__ |
|---|
Note: See
TracBrowser
for help on using the repository browser.