[Assorted-commits] SF.net SVN: assorted:[1264] cpp-commons/trunk/src/commons/exceptions.h
Brought to you by:
yangzhang
From: <yan...@us...> - 2009-03-06 21:17:20
|
Revision: 1264 http://assorted.svn.sourceforge.net/assorted/?rev=1264&view=rev Author: yangzhang Date: 2009-03-06 21:17:18 +0000 (Fri, 06 Mar 2009) Log Message: ----------- added not_implemented_exception; renamed operation_not_supported -> not_supported_exception Modified Paths: -------------- cpp-commons/trunk/src/commons/exceptions.h Modified: cpp-commons/trunk/src/commons/exceptions.h =================================================================== --- cpp-commons/trunk/src/commons/exceptions.h 2009-03-06 21:16:17 UTC (rev 1263) +++ cpp-commons/trunk/src/commons/exceptions.h 2009-03-06 21:17:18 UTC (rev 1264) @@ -9,16 +9,26 @@ using namespace std; - class operation_not_supported : public std::exception + class not_implemented_exception : public std::exception { public: - operation_not_supported(const string &op) : msg("operation not supported: " + op) {} - ~operation_not_supported() throw() {} + not_implemented_exception(const string &op) : msg("operation not implemented: " + op) {} + ~not_implemented_exception() throw() {} const char *what() const throw() { return msg.c_str(); } private: const string msg; }; + class not_supported_exception : public std::exception + { + public: + not_supported_exception(const string &op) : msg("operation not supported: " + op) {} + ~not_supported_exception() throw() {} + const char *what() const throw() { return msg.c_str(); } + private: + const string msg; + }; + class msg_exception : public std::exception { public: @@ -29,7 +39,8 @@ const string msg_; }; -#define throw_operation_not_supported() throw operation_not_supported(__PRETTY_FUNCTION__) +#define throw_not_supported() throw not_supported_exception(__PRETTY_FUNCTION__) +#define throw_not_implemented() throw not_implemented_exception(__PRETTY_FUNCTION__) } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |