tiy-houston-q3-rails / day-9

0 stars 0 forks source link

Weekend Project - Phew! :) #3

Open nanditacodes opened 10 years ago

nanditacodes commented 10 years ago

Code: https://gist.github.com/c05453ea22761096554d

Trello: https://trello.com/b/ONgTPHPl/blackjack

nanditacodes commented 10 years ago

Notes for myself:

  1. used product to combine 2 arrays
  2. Used exception handling
  3. used say
  4. used pop to get the last card out of the array
nanditacodes commented 10 years ago

Questions for Jesse

  1. What is the difference between Exception and Error? Which is preferred?
jwo commented 10 years ago

@nandita -> read here on why we should only rescue StandardError and it's descendants http://robots.thoughtbot.com/rescue-standarderror-not-exception

(Implying we should only subclass standarderror as well)

nanditacodes commented 10 years ago

Thanks Jesse. I have updated the code to extend StandardError instead of StandardException

jwo commented 10 years ago

@nanditacodes --

Otherwise it looks great. Would you like to try without using exceptions?