psi46/pxar — pull request #101 by hperrey (2014-04-09 15:56:20+00:00)
Title: Improve error condition handling via exceptions

I introduced our own exception classes and made use of them to
- handle pixel decoding errors: these will be counted for every DAQ readout; the value for the *last* DAQ readout can be read through ```pxar::api::daqGetNDecoderErrors()```
- corrupted DAQ readouts (i.e. missing events) throw a ```DataMissingEvent``` exception which can be caught on the UI side to handle this gracefully; for an example on how to do this, see 79bd503 which adds a 'retry' dialog to ```PixTest::efficiencyMaps()```; other (automatic) retries are of course also easily possible (and could be handled on a test-by-test basis
- printout of pixel decoding errors is reduced to one summary (critical) log message at the end of the readout, or is otherwise available as ```logDEBUGAPI```
- crucial RPC interface differences between pxar and the DTB firmware throw an ```FirmwareVersionMismatch``` exception which can be handled on the user side (see ```pXar.cc``` changes in commit 902cbf4); similarly, failing configuration sanity checks throw an InvalidConfig exception with information on the specific error.
- USB communication errors and timeouts throw custom exceptions

Left to be done:
- handle DAQ readout exceptions (i.e. ```DataMissingEvent```) either in all tests individually or in the classes they inherit from
- handle RPC/USB exceptions (and decide where/how -- should be rare in any case)
- API changes -> tag new version

This fixes psi46/pxar#9.