vendor/plugins/exception_notification/lib/exception_notifiable.rb
# When the action being executed has its own local error handling (rescue)
# Or when the error accurs somewhere without a subsequent render (eg. method calls in console)
When the action being executed has its own local error handling (rescue)
Or when the error accurs somewhere without a subsequent render
When the action being executed has its own local error handling ( rescue ) Or when the error accurs somewhere without a subsequent render
def rescue_with_handler(exception)
      to_return = super
      if to_return
        verbose = self.class.exception_notifiable_verbose
        puts "[RESCUE STYLE] rescue_with_handler" if verbose
        data = get_exception_data
        status_code = status_code_for_exception(exception)
        send_email = should_email_on_exception?(exception, status_code, verbose)
        send_web_hooks = should_web_hook_on_exception?(exception, status_code, verbose)
        the_blamed = ExceptionNotifier.config[:git_repo_path].nil? ? nil : lay_blame(exception)
        rejected_sections = %w(request session)
        verbose_output(exception, status_code, "rescued by handler", send_email, send_web_hooks, nil, the_blamed, rejected_sections) if verbose
        perform_exception_notify_mailing(exception, data, nil, the_blamed, verbose, rejected_sections) if send_email
        HooksNotifier.deliver_exception_to_web_hooks(ExceptionNotifier.config, exception, self, request, data, the_blamed) if send_web_hooks
      end
      to_return
    end
def rescue_with_handler ( exception ) to_return = super if to_return verbose = self . class . exception_notifiable_verbose puts "[RESCUE STYLE] rescue_with_handler" if verbose data = get_exception_data status_code = status_code_for_exception ( exception ) send_email = should_email_on_exception? ( exception , status_code , verbose ) send_web_hooks = should_web_hook_on_exception? ( exception , status_code , verbose ) the_blamed = ExceptionNotifier . config [ :git_repo_path ] . nil? ? nil : lay_blame ( exception ) rejected_sections = %w( request session ) verbose_output ( exception , status_code , "rescued by handler" , send_email , send_web_hooks , nil , the_blamed , rejected_sections ) if verbose perform_exception_notify_mailing ( exception , data , nil , the_blamed , verbose , rejected_sections ) if send_email HooksNotifier . deliver_exception_to_web_hooks ( ExceptionNotifier . config , exception , self , request , data , the_blamed ) if send_web_hooks end to_return end
When the action being executed has its own local error handling (rescue)
Or when the error accurs somewhere without a subsequent render (eg.
When the action being executed has its own local error handling ( rescue ) Or when the error accurs somewhere without a subsequent render ( eg .
#We only send email if it has been configured in environment #We only send web hooks if they've been configured in environment # Debugging output # Send the exception notification email # Send Web Hook requests
exception
<not_specific>