Skip to content

Commit b972e6e

Browse files
authored
Gracefully rescue NotImplementedError (#10)
1 parent ce6d79e commit b972e6e

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

lib/advent_of_code_cli/commands/example/solve.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ def solution(module_name, part, input)
5151
end
5252

5353
say "Took #{end_time - start_time} seconds to solve"
54+
rescue NotImplementedError
55+
say "Part #{part} has not yet been implemented", :yellow
5456
end
5557

5658
def expected_answers

lib/advent_of_code_cli/commands/solve.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ def solution(module_name, part, input)
3333

3434
say "Part #{part} result: #{result}"
3535
say "Took #{end_time - start_time} seconds to solve"
36+
rescue NotImplementedError
37+
say "Part #{part} has not yet been implemented", :yellow
3638
end
3739
end
3840
end

0 commit comments

Comments
 (0)