Skip to content

typo in the first line of DEFINE_EXCEPTION

xcept/include/xcept/Exception.h defines a macro DEFINE_EXCEPTION which could save a lot of typing. Unfortunately there is a typo in the first line (EXCEPTION_NNAME instead of EXCEPTION_NAME).

Could you please correct the typo and also add a constructor with a previous exception as an argument. The macro then would look like:

#define DEFINE_EXCEPTION(NAMESPACE1, EXCEPTION_NAME)
namespace NAMESPACE1 {
namespace exception {
class EXCEPTION_NAME: public xcept::Exception
{
public:
EXCEPTION_NAME( std::string name, std::string message, std::string module, int line, std::string function ):
xcept::Exception(name, message, module, line, function)
{};
EXCEPTION_NAME( std::string name, std::string message, std::string module, int line, std::string function, xcept::Exception& previous ):
xcept::Exception(name, message, module, line, function, previous)
{};
};
}
}

Originally submitted on sourceforge.net by Luciano Orsini ( lorsini ) - 2008-03-31 16:08

Edited by Luciano Orsini
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information