Skip to content
Snippets Groups Projects
Commit 1c158e2b authored by Florian Pose's avatar Florian Pose
Browse files

Overloaded throwCommandException().

parent 6d3aa773
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment