diff -r 04bcd38cf8dc -r bd4e5b544473 tool/Command.cpp --- a/tool/Command.cpp Mon Jul 28 08:28:42 2008 +0000 +++ b/tool/Command.cpp Mon Jul 28 08:45:28 2008 +0000 @@ -80,20 +80,32 @@ /*****************************************************************************/ -void Command::throwInvalidUsageException(const stringstream &s) +void Command::throwInvalidUsageException(const stringstream &s) const { throw InvalidUsageException(s); } /*****************************************************************************/ -void Command::throwCommandException(const stringstream &s) +void Command::throwCommandException(const stringstream &s) const { throw CommandException(s); } /*****************************************************************************/ +void Command::throwSingleSlaveRequired(unsigned int size) const +{ + stringstream err; + + err << "The slave selection matches " << size << "slaves. '" + << name << "' requires a single slave."; + + throwInvalidUsageException(err); +} + +/*****************************************************************************/ + Command::SlaveList Command::selectedSlaves(MasterDevice &m) { unsigned int numSlaves = m.slaveCount(), i, aliasIndex;