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.



128
129
130
131
132
# File 'lib/fluent/plugin/out_sentry.rb', line 128

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

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



124
125
126
# File 'lib/fluent/plugin/out_sentry.rb', line 124

def message
  @message
end

#typeObject (readonly)

Returns the value of attribute type.



123
124
125
# File 'lib/fluent/plugin/out_sentry.rb', line 123

def type
  @type
end

Instance Method Details

#to_hashObject



134
135
136
137
138
# File 'lib/fluent/plugin/out_sentry.rb', line 134

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