Introduce new epp error api #2588

This commit is contained in:
Martin Lensment 2015-07-21 14:08:10 +03:00
parent 8ed8687691
commit ea5a2e54fb
2 changed files with 16 additions and 2 deletions

View file

@ -8,6 +8,18 @@ class EppController < ApplicationController
before_action :latin_only
before_action :validate_request
before_action :update_epp_session
around_action :catch_epp_errors
def catch_epp_errors
err = catch(:epp_error) do
yield
nil
end
return unless err
@errors = [err]
handle_errors
end
helper_method :current_user
rescue_from StandardError do |e|