Sha256: 9fd07ea52031543729331f20a27a3785e4d9a24bce903d12bff86e56be7f273f

Contents?: true

Size: 839 Bytes

Versions: 6

Compression:

Stored size: 839 Bytes

Contents

module Errplane
  class BlackBox
    attr_reader :exception

    def initialize(params = {})
      @exception = params[:exception]
    end

    def to_json
      {
        :time => Time.now.to_i,
        :message => @exception.message,
        :backtrace => @exception.backtrace || [],
        :exception_class => @exception.class.to_s,
        :application_name => Errplane.configuration.application_name,
        :rails_root => Errplane.configuration.rails_root,
        :language => Errplane.configuration.language,
        :language_version => Errplane.configuration.language_version,
        :framework => Errplane.configuration.framework,
        :framework_version => Errplane.configuration.framework_version,
        :environment_variables => Errplane.configuration.environment_variables.to_hash,
      }.to_json
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
errplane-0.1.8 lib/errplane/black_box.rb
errplane-0.1.7 lib/errplane/black_box.rb
errplane-0.1.6 lib/errplane/black_box.rb
errplane-0.1.5 lib/errplane/black_box.rb
errplane-0.1.4 lib/errplane/black_box.rb
errplane-0.1.3 lib/errplane/black_box.rb