Regarding the file-based analysis, we can exit cppstats with an error, if any part of the analysis fails. See also issue #11:
The already existing error handling code (https://github.com/clhunsen/cppstats/blob/master/analyses/featurelocations.py#L687) seems to be handling that situation wrong as I would expected a crash instead of creating an invalid .csv file.
The same holds for writing of the srcML files. We should also incorporate the return value from executed commands into this (cf. https://github.com/clhunsen/cppstats/blob/master/preparation.py#L107)