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.



100
101
102
103
104
# File 'lib/fluent/plugin/out_sentry.rb', line 100

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

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



96
97
98
# File 'lib/fluent/plugin/out_sentry.rb', line 96

def message
  @message
end

#typeObject (readonly)

Returns the value of attribute type.



95
96
97
# File 'lib/fluent/plugin/out_sentry.rb', line 95

def type
  @type
end

Instance Method Details

#to_hashObject



106
107
108
109
110
# File 'lib/fluent/plugin/out_sentry.rb', line 106

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