|
|
@ -592,7 +592,7 @@ def main_impl(all_detector_classes, all_printer_classes): |
|
|
|
except SlitherException as se: |
|
|
|
except SlitherException as se: |
|
|
|
# Output our error accordingly, via JSON or logging. |
|
|
|
# Output our error accordingly, via JSON or logging. |
|
|
|
if stdout_json: |
|
|
|
if stdout_json: |
|
|
|
print(wrap_json_stdout(False, repr(se), [])) |
|
|
|
print(json.dumps(wrap_json_stdout(False, repr(se), []))) |
|
|
|
else: |
|
|
|
else: |
|
|
|
logging.error(red('Error:')) |
|
|
|
logging.error(red('Error:')) |
|
|
|
logging.error(red(se)) |
|
|
|
logging.error(red(se)) |
|
|
@ -602,7 +602,7 @@ def main_impl(all_detector_classes, all_printer_classes): |
|
|
|
except Exception: |
|
|
|
except Exception: |
|
|
|
# Output our error accordingly, via JSON or logging. |
|
|
|
# Output our error accordingly, via JSON or logging. |
|
|
|
if stdout_json: |
|
|
|
if stdout_json: |
|
|
|
print(wrap_json_stdout(False, traceback.format_exc(), [])) |
|
|
|
print(json.dumps(wrap_json_stdout(False, traceback.format_exc(), []))) |
|
|
|
else: |
|
|
|
else: |
|
|
|
logging.error('Error in %s' % args.filename) |
|
|
|
logging.error('Error in %s' % args.filename) |
|
|
|
logging.error(traceback.format_exc()) |
|
|
|
logging.error(traceback.format_exc()) |
|
|
|