It’s a good idea to define custom exception classes in Ruby libraries to allow users to match against specific library exceptions. For example, if you want to rescue a Phlex name error, you can match against Phlex::NameError.
Custom exception inheritance
Custom exception inheritance
Custom exception inheritance
It’s a good idea to define custom exception classes in Ruby libraries to allow users to match against specific library exceptions. For example, if you want to rescue a Phlex name error, you can match against Phlex::NameError.