|
Revision 13041, 0.5 kB
(checked in by robert, 14 months ago)
|
|
Ran script to remove trailing spaces and tabs
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 | #ifndef IVE_EXCEPTION |
|---|
| 2 | #define IVE_EXCEPTION 1 |
|---|
| 3 | |
|---|
| 4 | #include <string> |
|---|
| 5 | #include <osg/Referenced> |
|---|
| 6 | |
|---|
| 7 | namespace ive{ |
|---|
| 8 | |
|---|
| 9 | #define THROW_EXCEPTION(str) { throwException(new Exception(str)); return; } |
|---|
| 10 | #define in_THROW_EXCEPTION(str) { in->throwException(new Exception(str)); return; } |
|---|
| 11 | #define out_THROW_EXCEPTION(str) { out->throwException(new Exception(str)); return; } |
|---|
| 12 | |
|---|
| 13 | class Exception : public osg::Referenced |
|---|
| 14 | { |
|---|
| 15 | public: |
|---|
| 16 | Exception(std::string error); |
|---|
| 17 | ~Exception(); |
|---|
| 18 | const std::string& getError() const { return _error; }; |
|---|
| 19 | private: |
|---|
| 20 | std::string _error; |
|---|
| 21 | }; |
|---|
| 22 | |
|---|
| 23 | } |
|---|
| 24 | |
|---|
| 25 | #endif |
|---|