Improve dupplicate name report

pull/489/head
Josselin 5 years ago
parent e2303e5981
commit 0a4d350d02
  1. 3
      slither/__main__.py
  2. 2
      slither/solc_parsing/declarations/contract.py

@ -651,15 +651,18 @@ def main_impl(all_detector_classes, all_printer_classes):
except SlitherException as se: except SlitherException as se:
output_error = str(se) output_error = str(se)
traceback.print_exc()
logging.error(red('Error:')) logging.error(red('Error:'))
logging.error(red(output_error)) logging.error(red(output_error))
logging.error('Please report an issue to https://github.com/crytic/slither/issues') logging.error('Please report an issue to https://github.com/crytic/slither/issues')
except Exception: except Exception:
output_error = traceback.format_exc() output_error = traceback.format_exc()
logging.error(traceback.print_exc())
logging.error('Error in %s' % args.filename) logging.error('Error in %s' % args.filename)
logging.error(output_error) logging.error(output_error)
# If we are outputting JSON, capture the redirected output and disable the redirect to output the final JSON. # If we are outputting JSON, capture the redirected output and disable the redirect to output the final JSON.
if outputting_json: if outputting_json:
if 'console' in args.json_types: if 'console' in args.json_types:

@ -289,7 +289,7 @@ class ContractSolc04(Contract):
try: try:
for function in self.functions: for function in self.functions:
function.analyze_content() function.analyze_content()
except (VariableNotFound, KeyError) as e: except (VariableNotFound, KeyError, ParsingError) as e:
self.log_incorrect_parsing(f'Missing function {e}') self.log_incorrect_parsing(f'Missing function {e}')
return return

Loading…
Cancel
Save