Answer the question
In order to leave comments, you need to log in
How to catch all internal exceptions of the RoR framework?
Is there some way to only catch internal exceptions that are used by the RoR framework itself, but not by other frameworks? Let's say ActionController::RoutingError, and many others. Maybe they have a common ancestor?
Answer the question
In order to leave comments, you need to log in
As for the ancestors, using the ancestors method, you can suggest that the ActionController::RoutingError has a base rail class ActionController::ActionControllerError (which already goes back to the ruby StandardError).
2.3.1 :029 > ActionController::RoutingError.ancestors
=> [ActionController::RoutingError,
ActionController::ActionControllerError,
StandardError, Exception, ActiveSupport::Dependencies::Blamable,
Object, PP::ObjectMixin, ActiveSupport::Dependencies::Loadable,
V8::Conversion::Object,
JSON::Ext::Generator::GeneratorMethods::Object,
Kernel,
BasicObject]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question