Overloaded throwCommandException().
authorFlorian Pose <fp@igh-essen.com>
Fri, 05 Mar 2010 13:20:42 +0100
changeset 1834 67fc217d7341
parent 1833 5adbf2bc48d9
child 1835 20748e9d2238
Overloaded throwCommandException().
tool/Command.cpp
tool/Command.h
--- 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;