mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-19 00:46:03 +01:00
trunk/branch integration: fix
This commit is contained in:
parent
2b5ba226be
commit
d54be1606b
@ -1,7 +1,7 @@
|
||||
//
|
||||
// Exception.h
|
||||
//
|
||||
// $Id: //poco/svn/Foundation/include/Poco/Exception.h#2 $
|
||||
// $Id: //poco/1.4/Foundation/include/Poco/Exception.h#2 $
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: Core
|
||||
@ -159,26 +159,28 @@ inline int Exception::code() const
|
||||
// pointers (which we need for specifying the exception name)
|
||||
// are not allowed as template arguments.
|
||||
//
|
||||
#define POCO_DECLARE_EXCEPTION(API, CLS, BASE) \
|
||||
class API CLS: public BASE \
|
||||
{ \
|
||||
public: \
|
||||
CLS(int code = 0); \
|
||||
CLS(const std::string& msg, int code = 0); \
|
||||
CLS(const std::string& msg, const std::string& arg, int code = 0); \
|
||||
CLS(const std::string& msg, const Poco::Exception& exc, int code = 0); \
|
||||
CLS(const CLS& exc); \
|
||||
~CLS() throw(); \
|
||||
CLS& operator = (const CLS& exc); \
|
||||
#define POCO_DECLARE_EXCEPTION_CODE(API, CLS, BASE, CODE) \
|
||||
class API CLS: public BASE \
|
||||
{ \
|
||||
public: \
|
||||
CLS(int code = CODE); \
|
||||
CLS(const std::string& msg, int code = CODE); \
|
||||
CLS(const std::string& msg, const std::string& arg, int code = CODE); \
|
||||
CLS(const std::string& msg, const Poco::Exception& exc, int code = CODE); \
|
||||
CLS(const CLS& exc); \
|
||||
~CLS() throw(); \
|
||||
CLS& operator = (const CLS& exc); \
|
||||
const char* name() const throw(); \
|
||||
const char* className() const throw(); \
|
||||
Poco::Exception* clone() const; \
|
||||
void rethrow() const; \
|
||||
};
|
||||
void rethrow() const; \
|
||||
};
|
||||
|
||||
#define POCO_DECLARE_EXCEPTION(API, CLS, BASE) \
|
||||
POCO_DECLARE_EXCEPTION_CODE(API, CLS, BASE, 0)
|
||||
|
||||
#define POCO_IMPLEMENT_EXCEPTION(CLS, BASE, NAME) \
|
||||
CLS::CLS(int code): BASE(code) \
|
||||
#define POCO_IMPLEMENT_EXCEPTION(CLS, BASE, NAME) \
|
||||
CLS::CLS(int code): BASE(code) \
|
||||
{ \
|
||||
} \
|
||||
CLS::CLS(const std::string& msg, int code): BASE(msg, code) \
|
||||
|
Loading…
x
Reference in New Issue
Block a user