merge -c1618 branches/1.4-foe: Improved FoE.

This commit is contained in:
Florian Pose
2009-01-26 13:09:27 +00:00
parent 7a703ecb05
commit 8d45915fc4
11 changed files with 167 additions and 65 deletions
+10 -3
View File
@@ -12,6 +12,7 @@
using namespace std;
#include "CommandFoeWrite.h"
#include "foe.h"
/*****************************************************************************/
@@ -119,9 +120,15 @@ void CommandFoeWrite::execute(MasterDevice &m, const StringVector &args)
} catch (MasterDeviceException &e) {
if (data.buffer_size)
delete [] data.buffer;
if (data.abort_code) {
err << "Failed to write via FoE: "
<< errorString(data.abort_code);
if (data.result) {
if (data.result == FOE_OPCODE_ERROR) {
err << "FoE write aborted with error code 0x"
<< setw(8) << setfill('0') << hex << data.error_code
<< ": " << errorText(data.error_code);
} else {
err << "Failed to write via FoE: "
<< resultText(data.result);
}
throwCommandException(err);
} else {
throw e;