The current implementation of rescue_from uses a hash table of class names. When an exception is raised there's a table lookup by class name.
In consequence, inheritance of exceptions (useful for catchalls) is not taken into account, nor the controllers hierarchy. Handlers can't reliably take over the exceptions of previously declared handlers, .... This patch provides those features and additionally allows strings in rescue_from declarations instead of constants. This way you may define a handler for an exception whose definition has not yet been executed.