9acc44b15c
When a pyeclib decode fails, we just get a stack trace in Swift. This patch adds some extra details around the failed decode to give us a better idea of why. In this patch we now track the number of segments returned and the lengths of each fragment, and also stitch the message of the exception returned from liberasurecode. So all together a line looks something like: Nov 22 02:53:34 saio1 proxy-server[30535]: Error decoding fragments for \ '/AUTH_test/ec/obj'. segments decoded: 0, lengths: [82, 82, 82, 82]: \ pyeclib_c_decode ERROR: Fragment integrity check failed. Please inspect \ syslog for liberasurecode error report. \ (txn: txbabfabdd22ed4999834fa-00619b062e) (client_ip: 127.0.0.1) NOTE: The fragments lengths could be done down in pyeclib and passed back through the error, but doing in ECIter means it'll work for all EC drivers. Thre is a still a stack trace, as we always reraise when we encouter an exception during the ECIter is in flight. But the log line before it should now tell us why. Change-Id: I04ee8149e895ec66a33b4f21fea3def770a248f5