Author: Samuel WilliamsWhen: Wednesday, 05 August 2009
It is important to understand the place of StandardError in the hierarchy of ruby exceptions:
The result of this code is:
This behavior is consistent with the way ruby exceptions are designed; Errors which you can generally deal with are subclassed from StandardError, while errors which indicate a failure in the semantic meaning of the code or its execution inherit directly from Exception
This gives us a list of exception classes:
Generally, if you are making your own exception class for non-fatal execution errors, you should inherit from StandardError or one of its descendants.