Files
OpenSceneGraph/src/osgPlugins/ive/Exception.h
2012-03-21 17:36:20 +00:00

26 lines
554 B
C++

#ifndef IVE_EXCEPTION
#define IVE_EXCEPTION 1
#include <string>
#include <osg/Referenced>
namespace ive{
#define THROW_EXCEPTION(str) { throwException(new Exception(str)); return; }
#define in_THROW_EXCEPTION(str) { in->throwException(new Exception(str)); return; }
#define out_THROW_EXCEPTION(str) { out->throwException(new Exception(str)); return; }
class Exception : public osg::Referenced
{
public:
Exception(std::string error);
~Exception();
const std::string& getError() const { return _error; };
private:
std::string _error;
};
}
#endif