lib/honeybadger/agent.rb in honeybadger-3.4.0.beta1 vs lib/honeybadger/agent.rb in honeybadger-4.0.0
- old
+ new
@@ -108,12 +108,10 @@
# @option opts [Exception] :cause The cause for this error (optional).
#
# @return [String] UUID reference to the notice within Honeybadger.
# @return [false] when ignored.
def notify(exception_or_opts, opts = {})
- return false if config.disabled?
-
if exception_or_opts.is_a?(Exception)
opts[:exception] = exception_or_opts
elsif exception_or_opts.respond_to?(:to_hash)
opts.merge!(exception_or_opts.to_hash)
else
@@ -291,44 +289,44 @@
#
# @!method configure
# @yield [Config::Ruby] configuration object.
def_delegator :config, :configure
- # Callback to ignore exceptions.
+ # DEPRECATED: Callback to ignore exceptions.
#
# See public API documentation for {Honeybadger::Notice} for available attributes.
#
# @example
# # Ignoring based on error message:
# Honeybadger.exception_filter do |notice|
- # notice[:error_message] =~ /sensitive data/
+ # notice.error_message =~ /sensitive data/
# end
#
# # Ignore an entire class of exceptions:
# Honeybadger.exception_filter do |notice|
- # notice[:exception].class < MyError
+ # notice.exception.class < MyError
# end
#
# @!method exception_filter
# @yieldreturn [Boolean] true (to ignore) or false (to send).
def_delegator :config, :exception_filter
- # Callback to add a custom grouping strategy for exceptions. The return
+ # DEPRECATED: Callback to add a custom grouping strategy for exceptions. The return
# value is hashed and sent to Honeybadger. Errors with the same fingerprint
# will be grouped.
#
# See public API documentation for {Honeybadger::Notice} for available attributes.
#
# @example
# Honeybadger.exception_fingerprint do |notice|
- # [notice[:error_class], notice[:component], notice[:backtrace].to_s].join(':')
+ # [notice.error_class, notice.component, notice.backtrace.to_s].join(':')
# end
#
# @!method exception_fingerprint
# @yieldreturn [#to_s] The fingerprint of the error.
def_delegator :config, :exception_fingerprint
- # Callback to filter backtrace lines. One use for this is to make
+ # DEPRECATED: Callback to filter backtrace lines. One use for this is to make
# additional [PROJECT_ROOT] or [GEM_ROOT] substitutions, which are used by
# Honeybadger when grouping errors and displaying application traces.
#
# @example
# Honeybadger.backtrace_filter do |line|