Skip to content

Commit

Permalink
#43 catch better
Browse files Browse the repository at this point in the history
  • Loading branch information
Yegor Bugayenko committed Sep 7, 2015
1 parent 423efa6 commit 5f73a1a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/pdd/source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ def puzzles
puzzles = []
lines = File.readlines(@file)
lines.each_with_index do |line, idx|
re.match(line) do |match|
begin
begin
re.match(line) do |match|
puzzles << puzzle(lines.drop(idx + 1), match, idx)
rescue Error => ex
raise Error, "#{ex.message} in line ##{idx}"
end
rescue Error => ex
raise Error, "#{ex.message} in line ##{idx} of #{@path}"
end
/(.*(?:^|\s))@todo\s+#([\w\-\.:\/]+)/
end
Expand Down

0 comments on commit 5f73a1a

Please sign in to comment.