Permalink
Browse files

Print ast in case of failure

  • Loading branch information...
1 parent fc37eed commit 22ad758667defe9156c7bb87e651761766527ad8 Markus Schirp committed Aug 20, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 bin/to_source
View
@@ -7,5 +7,10 @@ ARGV.each do |path|
ast = source.to_ast
next if ast.nil? # When file only has comments
$stderr.puts(path)
- $stdout.puts(ToSource.to_source(ast))
+ begin
+ $stdout.puts(ToSource.to_source(ast))
+ rescue
+ ast.ascii_graph
+ raise
+ end
end

0 comments on commit 22ad758

Please sign in to comment.