Overloaded throwCommandException().

This commit is contained in:
Florian Pose 2010-03-05 13:20:42 +01:00
parent 7c6712415c
commit f904612136
2 changed files with 13 additions and 0 deletions

View File

@ -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);

View File

@ -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;