Created
January 13, 2015 21:06
-
-
Save ravicious/27df6e5e97061f5f4d87 to your computer and use it in GitHub Desktop.
Code examples for my comment under Henrik's post http://thepugautomatic.com/2015/01/exception-class/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin | |
class_a_instance.do_something | |
class_b_instance.do_something | |
rescue A::NotEnoughMoney | |
log_error | |
cleanup | |
rescue B::NotEnoughMoney | |
just_send_email | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin | |
class_a_instance.do_something | |
rescue NotEnoughMoney | |
log_error | |
cleanup | |
end | |
begin | |
class_b_instance.do_something | |
rescue NotEnoughMoney | |
just_send_email | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment