lib/reek/source/source_code.rb in reek-1.3.4 vs lib/reek/source/source_code.rb in reek-1.3.5
- old
+ new
@@ -31,10 +31,10 @@
def configure(sniffer) end
def syntax_tree
begin
ast = @parser.parse(@source, @desc)
- rescue Exception => error
+ rescue Racc::ParseError, RubyParser::SyntaxError => error
@@err_io.puts "#{desc}: #{error.class.name}: #{error}"
end
ast ||= s()
TreeDresser.new.dress(ast)
end