Fix incorrect parsing in case of empty catch statement

pull/442/head
Josselin 5 years ago
parent 746e47ad71
commit 6f9c21b15b
  1. 2
      slither/solc_parsing/declarations/function.py

@ -511,6 +511,7 @@ class FunctionSolc(Function):
def _parse_catch(self, statement, node):
block = statement.get('block', None)
if block is None:
raise ParsingError('Catch not correctly parsed by Slither %s' % statement)
try_node = self._new_node(NodeType.CATCH, statement['src'])
@ -521,6 +522,7 @@ class FunctionSolc(Function):
else:
params = statement[self.get_children('children')]
if params:
for param in params.get('parameters', []):
assert param[self.get_key()] == 'VariableDeclaration'
self._add_param(param)

Loading…
Cancel
Save