One common paradigm is to create a helper function:
class bmd2FileException : public bmd2Exception
{
private:
static std::string make_msg(const std::string & _description, const char * _file, long int _line);
public:
bmd2FileException(const std::string & _description, const char * _file, long int _line)
: bmd2Exception(make_msg(_description, _file, _line))
{ }
};
Now just put your message-creating code in bmd2FileException::make_msg(...)
.
By the way, if your constructor is concatenating strings, I wouldn't be so sure it is throw()
.