tool/Command.h
changeset 1834 67fc217d7341
parent 1826 ec6223c3b7ec
child 1869 14f634f5b613
equal deleted inserted replaced
1833:5adbf2bc48d9 1834:67fc217d7341
    60     public runtime_error
    60     public runtime_error
    61 {
    61 {
    62     friend class Command;
    62     friend class Command;
    63 
    63 
    64     protected:
    64     protected:
       
    65         /** Constructor with char * parameter. */
       
    66         CommandException(
       
    67                 const string &msg /**< Message. */
       
    68                 ): runtime_error(msg) {}
       
    69 
    65         /** Constructor with stringstream parameter. */
    70         /** Constructor with stringstream parameter. */
    66         CommandException(
    71         CommandException(
    67                 const stringstream &s /**< Message. */
    72                 const stringstream &s /**< Message. */
    68                 ): runtime_error(s.str()) {}
    73                 ): runtime_error(s.str()) {}
    69 };
    74 };
   114 
   119 
   115     protected:
   120     protected:
   116         enum {BreakAfterBytes = 16};
   121         enum {BreakAfterBytes = 16};
   117 
   122 
   118         void throwInvalidUsageException(const stringstream &) const;
   123         void throwInvalidUsageException(const stringstream &) const;
       
   124         void throwCommandException(const string &) const;
   119         void throwCommandException(const stringstream &) const;
   125         void throwCommandException(const stringstream &) const;
   120         void throwSingleSlaveRequired(unsigned int) const;
   126         void throwSingleSlaveRequired(unsigned int) const;
   121 
   127 
   122         typedef list<ec_ioctl_slave_t> SlaveList;
   128         typedef list<ec_ioctl_slave_t> SlaveList;
   123         SlaveList selectedSlaves(MasterDevice &);
   129         SlaveList selectedSlaves(MasterDevice &);