I have noticed that in the Ruby exception hierarchy, there are “errors” such as ArgumentError and there are “exceptions” such as SignalException. Is there a certain practise of naming exceptions? thanks in advance, ell.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Looking at the list of Ruby exceptions,
SignalExceptionis the only one that is named*Exception; everything else is anXXXError(except forSystemExitandfatal). If anything, the practice is to name your exceptionFooError. I’m having trouble finding any specific reason whySignalExceptionisn’t namedSignalError.