tool/CommandSoeWrite.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 "CommandSoeWrite.h"
    33 #include "CommandSoeWrite.h"
    35 #include "MasterDevice.h"
    34 #include "MasterDevice.h"
    36 
    35 
   146 
   145 
   147     try {
   146     try {
   148         m.writeSoe(&ioctl);
   147         m.writeSoe(&ioctl);
   149     } catch (MasterDeviceSoeException &e) {
   148     } catch (MasterDeviceSoeException &e) {
   150         delete [] ioctl.data;
   149         delete [] ioctl.data;
   151         err << "SoE write command aborted with code 0x"
   150         err << "SoE write command failed with code " << errorMsg(e.errorCode);
   152             << setfill('0') << hex << setw(4) << e.errorCode << ".";
       
   153         throwCommandException(err);
   151         throwCommandException(err);
   154     } catch (MasterDeviceException &e) {
   152     } catch (MasterDeviceException &e) {
   155         delete [] ioctl.data;
   153         delete [] ioctl.data;
   156         throw e;
   154         throw e;
   157     }
   155     }