exceptions.h

来自「GPS的一个应用程序,很不错的.大家试一试.」· C头文件 代码 · 共 39 行

H
39
字号
#ifndef EXCEPTIONS_H#define EXCEPTIONS_H#include <stdexcept>namespace gpsmgr { namespace exceptions {    struct IllegalValue {};    struct ParseError {};        template <class T>    class Exception : public runtime_error    {    public:	typedef T Type;		Exception() :	    runtime_error(""),	    mType ()	    {}		Exception(const string& what,		  const T& exc = T()) :	    runtime_error(what),	    mType (exc)	    {}	const Type& type() const	    { return mType; }	    private:	T mType;    };		   } }#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?