diff --git a/tool/Command.cpp b/tool/Command.cpp index c51ad312..82590d13 100644 --- a/tool/Command.cpp +++ b/tool/Command.cpp @@ -146,6 +146,13 @@ void Command::throwInvalidUsageException(const stringstream &s) const /*****************************************************************************/ +void Command::throwCommandException(const string &msg) const +{ + throw CommandException(msg); +} + +/*****************************************************************************/ + void Command::throwCommandException(const stringstream &s) const { throw CommandException(s); diff --git a/tool/Command.h b/tool/Command.h index 275cb8e3..a51aa171 100644 --- a/tool/Command.h +++ b/tool/Command.h @@ -62,6 +62,11 @@ class CommandException: friend class Command; protected: + /** Constructor with char * parameter. */ + CommandException( + const string &msg /**< Message. */ + ): runtime_error(msg) {} + /** Constructor with stringstream parameter. */ CommandException( const stringstream &s /**< Message. */ @@ -116,6 +121,7 @@ class Command enum {BreakAfterBytes = 16}; void throwInvalidUsageException(const stringstream &) const; + void throwCommandException(const string &) const; void throwCommandException(const stringstream &) const; void throwSingleSlaveRequired(unsigned int) const;