summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlib/common/makeexception.pl.in12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/common/makeexception.pl.in b/lib/common/makeexception.pl.in
index 1564b75b..76b9b02b 100755
--- a/lib/common/makeexception.pl.in
+++ b/lib/common/makeexception.pl.in
@@ -71,13 +71,14 @@ print H <<__E;
class ${class}Exception : public BoxException
{
public:
- ${class}Exception(unsigned int SubType)
- : mSubType(SubType)
+ ${class}Exception(unsigned int SubType,
+ const std::string& rMessage = "")
+ : mSubType(SubType), mMessage(rMessage)
{
}
${class}Exception(const ${class}Exception &rToCopy)
- : mSubType(rToCopy.mSubType)
+ : mSubType(rToCopy.mSubType), mMessage(rToCopy.mMessage)
{
}
@@ -108,9 +109,14 @@ print H <<__E;
virtual unsigned int GetType() const throw();
virtual unsigned int GetSubType() const throw();
virtual const char *what() const throw();
+ virtual const std::string& GetMessage() const
+ {
+ return mMessage;
+ }
private:
unsigned int mSubType;
+ std::string mMessage;
};
#endif // $guardname