Overloaded throwCommandException().
--- a/tool/Command.cpp Wed Mar 03 21:40:14 2010 +0100
+++ b/tool/Command.cpp Fri Mar 05 13:20:42 2010 +0100
@@ -146,6 +146,13 @@
/*****************************************************************************/
+void Command::throwCommandException(const string &msg) const
+{
+ throw CommandException(msg);
+}
+
+/*****************************************************************************/
+
void Command::throwCommandException(const stringstream &s) const
{
throw CommandException(s);
--- a/tool/Command.h Wed Mar 03 21:40:14 2010 +0100
+++ b/tool/Command.h Fri Mar 05 13:20:42 2010 +0100
@@ -62,6 +62,11 @@
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 @@
enum {BreakAfterBytes = 16};
void throwInvalidUsageException(const stringstream &) const;
+ void throwCommandException(const string &) const;
void throwCommandException(const stringstream &) const;
void throwSingleSlaveRequired(unsigned int) const;