Class: Sentry::CustomExceptionInterface

Inherits:
Interface
  • Object
show all
Defined in:
lib/fluent/plugin/out_sentry.rb

Constant Summary collapse

SKIP_INSPECTION_ATTRIBUTES =
[:@stacktrace]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, message:, stacktrace: nil) ⇒ CustomExceptionInterface

Returns a new instance of CustomExceptionInterface.



125
126
127
128
129
# File 'lib/fluent/plugin/out_sentry.rb', line 125

def initialize(type:, message:, stacktrace: nil)
  @type = type
  @value = message
  @stacktrace = stacktrace
end

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



121
122
123
# File 'lib/fluent/plugin/out_sentry.rb', line 121

def message
  @message
end

#typeObject (readonly)

Returns the value of attribute type.



120
121
122
# File 'lib/fluent/plugin/out_sentry.rb', line 120

def type
  @type
end

Instance Method Details

#to_hashObject



131
132
133
134
135
# File 'lib/fluent/plugin/out_sentry.rb', line 131

def to_hash
  data = super
  data[:stacktrace] = data[:stacktrace].to_hash if data[:stacktrace]
  data
end