Sha256: eedb82f4078ff7a6023d88849b35f4694a4bb4bf46c9192d930daf999851d55c
Contents?: true
Size: 716 Bytes
Versions: 25
Compression:
Stored size: 716 Bytes
Contents
# frozen_string_literal: true module ElasticAPM class Error # @api private class Exception MOD_SPLIT = '::'.freeze def initialize(exception, **attrs) @message = "#{exception.class}: #{exception.message}" @type = exception.class.to_s @module = format_module exception attrs.each do |key, val| send(:"#{key}=", val) end end attr_accessor( :attributes, :code, :handled, :message, :module, :stacktrace, :type ) private def format_module(exception) exception.class.to_s.split(MOD_SPLIT)[0...-1].join(MOD_SPLIT) end end end end
Version data entries
25 entries across 25 versions & 1 rubygems