# HG changeset patch # User Sebastien Jodogne # Date 1570454789 -7200 # Node ID d7d3227c11a9bf3887b5a229896639709c586b16 # Parent 01631b65837c2521d443a77c96d4a690c1dd1c77# Parent 839d2bff92abffc8dd4aa375658d033d5bf4a7d2 merge diff -r 01631b65837c -r d7d3227c11a9 .hgtags --- a/.hgtags Mon Oct 07 15:26:16 2019 +0200 +++ b/.hgtags Mon Oct 07 15:26:29 2019 +0200 @@ -32,3 +32,4 @@ 53cc787bd7bce69639a6003ee20c8a2b304030e4 toa2019092301 ac88989817e3b4249ebab6a824466bbb62f70452 toa2019093001 7b89e88bb66ebd3cd89d414d1010310c7d4cfbac toa2019100701 +e160159b19057e967f3c8a397f23121fba969bcc toa2019100702 diff -r 01631b65837c -r d7d3227c11a9 Framework/StoneException.h --- a/Framework/StoneException.h Mon Oct 07 15:26:16 2019 +0200 +++ b/Framework/StoneException.h Mon Oct 07 15:26:29 2019 +0200 @@ -58,6 +58,8 @@ { } + virtual ~StoneException() {} + ErrorCode GetErrorCode() const { return errorCode_; @@ -111,6 +113,7 @@ { protected: int applicationErrorCode_; + mutable std::string errorMessage_; public: explicit StoneApplicationException(int applicationErrorCode) : @@ -126,7 +129,10 @@ virtual const char* What() const { - return boost::lexical_cast(applicationErrorCode_).c_str(); + if (errorMessage_.size() == 0) + errorMessage_ = boost::lexical_cast(applicationErrorCode_); + + return errorMessage_.c_str(); } }; }