kyletolle / sudocore

Sudoku solver written in Ruby.
BSD 2-Clause "Simplified" License
2 stars 0 forks source link

Clean up error processing #9

Closed kyletolle closed 12 years ago

kyletolle commented 12 years ago

Seems like it'd be better to do all the error checking for the sudoku in one place. That way we can raise and handle all the errors related to this in a common place instead of having it spread all over.

Would this be best in Puzzle#valid? or somewhere else? Also need to handle all these errors gracefully.

kyletolle commented 12 years ago

Saw this article on duck typing today. Should be able to incorporate some of that into the error handling. http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/100511

kyletolle commented 12 years ago

Didn't put in code to gracefully handle errors that did occur. Ruby just quits and prints out the stack.