Skip to content
Snippets Groups Projects

Simplify reduction operation implementations and error handling

Merged Philipp Schmidt requested to merge feat/error-handling into feat/compress-keys
Files
4
+ 3
10
@@ -12,8 +12,7 @@ import sys
from pkg_resources import iter_entry_points
from extra_data import RunDirectory, open_run
from ..data_reduction.red_writer import ReduceWriter, \
InputDataError, ReduceMethodError
from ..data_reduction.red_writer import ReduceWriter, ReduceInitError
def _parse_args(argv):
@@ -216,14 +215,8 @@ def main(argv=None):
try:
writer = ReduceWriter(inp_data, methods, args.output_scope,
args.output_sequence_len, args.output_version)
except InputDataError as e:
log.error(str(e))
log.critical('Failed to initialize reduction writer for this input')
return
except ReduceMethodError as e:
log.error(str(e))
log.critical('Failed to initialize reduction writer for generated '
'reduction operations')
except ReduceInitError:
log.critical('Failed to initialize reduction writer')
return
if args.output_scope == 'none':
Loading