module ExceptionHunter
@api public
Constants
- VERSION
Public Class Methods
routes(router)
click to toggle source
Mounts the ExceptionHunter
dashboard at /exception_hunter if it's enabled on the current environment.
@example
Rails.application.routes.draw do ExceptionHunter.routes(self) end
@param [ActionDispatch::Routing::Mapper] router to mount to @return [void]
# File lib/exception_hunter.rb, line 41 def self.routes(router) return unless Config.enabled router.mount(ExceptionHunter::Engine, at: 'exception_hunter') end
setup(&block)
click to toggle source
Used to setup ExceptionHunter's configuration it receives a block with the {ExceptionHunter::Config} singleton class.
@return [void]
# File lib/exception_hunter.rb, line 26 def self.setup(&block) block.call(Config) validate_config! end
validate_config!()
click to toggle source
@private
# File lib/exception_hunter.rb, line 48 def self.validate_config! notifiers = Config.notifiers return if notifiers.blank? notifiers.each do |notifier| next if notifier[:name] == :slack && notifier.dig(:options, :webhook).present? raise ExceptionHunter::Notifiers::MisconfiguredNotifiers, notifier end end