Ruby Language Exceptions


An exception is an object that represents the occurrence of an exceptional condition. In other words, it indicates that something went wrong.

In Ruby, exceptions are often referred to as errors. That's because the base Exception class exists as a top-level exception object element, but user-defined execution exceptions are generally StandardError or descendants.