[GEM-cvs] SF.net SVN: pd-gem:[3105] trunk/Gem/src/Base
Brought to you by:
zmoelnig
From: <zmo...@us...> - 2010-01-27 14:49:40
|
Revision: 3105 http://pd-gem.svn.sourceforge.net/pd-gem/?rev=3105&view=rev Author: zmoelnig Date: 2010-01-27 14:49:33 +0000 (Wed, 27 Jan 2010) Log Message: ----------- also except std::string when creating an exception Modified Paths: -------------- trunk/Gem/src/Base/GemException.cpp trunk/Gem/src/Base/GemException.h Modified: trunk/Gem/src/Base/GemException.cpp =================================================================== --- trunk/Gem/src/Base/GemException.cpp 2010-01-27 14:47:59 UTC (rev 3104) +++ trunk/Gem/src/Base/GemException.cpp 2010-01-27 14:49:33 UTC (rev 3105) @@ -24,6 +24,10 @@ : ErrorString(error) {} +GemException::GemException(const std::string error) throw() + : ErrorString(error.c_str()) +{} + GemException::GemException() throw() : ErrorString(NULL) {} Modified: trunk/Gem/src/Base/GemException.h =================================================================== --- trunk/Gem/src/Base/GemException.h 2010-01-27 14:47:59 UTC (rev 3104) +++ trunk/Gem/src/Base/GemException.h 2010-01-27 14:49:33 UTC (rev 3105) @@ -32,16 +32,18 @@ #define INCLUDE_GEMEXCEPTION_H_ #include "Base/GemExportDef.h" +#include <string> class GEM_EXTERN GemException { public: GemException(void) throw(); GemException(const char*error) throw(); + GemException(const std::string error) throw(); virtual ~GemException(void) throw(); virtual const char *what(void) const throw(); - virtual void report(const char*origin=NULL) const throw(); + virtual void report(const char*origin=0) const throw(); private: const char*ErrorString; }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |