diff --git a/tool/Command.cpp b/tool/Command.cpp index c51ad3122bfa1fd48f6d68cce111bda12e5f73ca..82590d13a9fe59672e79d5407a18ae0bfe052c0f 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 275cb8e3ea6a1adecf0687925a5455fbbc2a7f48..a51aa171d29afc4b24637053c2826957ab175541 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;