Skip to content

Commit 3f6fb87

Browse files
author
Yegor Bugayenko
committedNov 4, 2014
#19 line number
1 parent 698a0d9 commit 3f6fb87

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎lib/pdd/source.rb

+5-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,11 @@ def minutes(num, units)
7070

7171
# Fetch puzzle
7272
def puzzle(lines, match, idx)
73-
tail = tail(lines, match[1])
73+
begin
74+
tail = tail(lines, match[1])
75+
rescue Error => ex
76+
raise Error, "#{ex.message} line ##{idx}"
77+
end
7478
body = (match[3] + ' ' + tail.join(' ')).gsub(/\s+/, ' ').strip
7579
Puzzle.new(
7680
marker(match[2]).merge(

0 commit comments

Comments
 (0)
Please sign in to comment.