Skip to main content

Timeline for Good approach to raise an exception

Current License: CC BY-SA 3.0

5 events
when toggle format what by license comment
Aug 2, 2014 at 23:08 history migrated from stackoverflow.com (revisions)
Aug 2, 2014 at 10:51 vote accept CommunityBot
Aug 2, 2014 at 10:17 comment added DMKE It is one char shorter. Other than that, they're equivalent. I personally don't like Ruby one-liners when they contain an ";". Declaring an error class should be a one-liner, hence the Class.new assignment.
Aug 2, 2014 at 10:15 comment added Grych Just curious, is there a difference beteween Error = Class.new StandardError and class Error < StandardError; end?
Aug 2, 2014 at 10:04 history answered DMKE CC BY-SA 3.0