Rails does not propagate Java exception to ApplicationController -
i have rails website, , models cause backend service. have rescue_from standarderror in applicationcontroller, can capture rails exception, cannot capture exceptions backend service.
applicationcontroller:
class applicationcontroller < actioncontroller::base rescue_from standarderror |exception| # end end
actual controller:
class statementscontroller < applicationcontroller def show # statement respond_to :js end end
if "raise 'error message'" inside show method, applicationcontroller's rescue method can capture error. if statement encounters service exception backend service, applicationcontroller cannot catch it. however, if do
class statementscontroller < applicationcontroller def show # statement respond_to :js rescue standarderror => e # don't need write code here end end
then applicationcontroller can catch java exception. new rails. can me this? thanks
Comments
Post a Comment