Ruby Exception: Get Object information that caused the exception : Below is the piece of code that I have written to handle my exception.

    Class Business < ExceptionController
      def work(arg1,arg2)
            #####some business logic that cause exception
      end
    end
    
    class ExceptionController < ApplicationController
      rescue_from Exception, :with => :render_error_response
    
      def render_error_response(e)
         p e.message
         p e.backtrace
      end
    end

So, I log the message and backtrace in the render_error_response defined in exception controller. What I want is to print the arguments of the function i.e. arg1,arg2 of work function that caused the exception.

So basically, along with exception backtrace, I need the object trace as well.