tool/CommandSoeRead.cpp
changeset 1877 7b77000f9764
parent 1872 23d4e121faaf
child 1953 968a531e5a89
equal deleted inserted replaced
1876:0ebb802ac08d 1877:7b77000f9764
    26  *  industrial property and similar rights of Beckhoff Automation GmbH.
    26  *  industrial property and similar rights of Beckhoff Automation GmbH.
    27  *
    27  *
    28  ****************************************************************************/
    28  ****************************************************************************/
    29 
    29 
    30 #include <iostream>
    30 #include <iostream>
    31 #include <iomanip>
       
    32 using namespace std;
    31 using namespace std;
    33 
    32 
    34 #include "CommandSoeRead.h"
    33 #include "CommandSoeRead.h"
    35 #include "MasterDevice.h"
    34 #include "MasterDevice.h"
    36 
    35 
   125 
   124 
   126     try {
   125     try {
   127         m.readSoe(&ioctl);
   126         m.readSoe(&ioctl);
   128     } catch (MasterDeviceSoeException &e) {
   127     } catch (MasterDeviceSoeException &e) {
   129         delete [] ioctl.data;
   128         delete [] ioctl.data;
   130         err << "SoE read command aborted with code 0x"
   129         err << "SoE read command failed with code " << errorMsg(e.errorCode);
   131             << setfill('0') << hex << setw(4) << e.errorCode;
       
   132         throwCommandException(err);
   130         throwCommandException(err);
   133     } catch (MasterDeviceException &e) {
   131     } catch (MasterDeviceException &e) {
   134         delete [] ioctl.data;
   132         delete [] ioctl.data;
   135         throw e;
   133         throw e;
   136     }
   134     }