Class: Sentry::Mechanism

Inherits:
Interface show all
Defined in:
lib/sentry/interfaces/mechanism.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Interface

#to_hash

Constructor Details

#initialize(type: "generic", handled: true) ⇒ Mechanism

Returns a new instance of Mechanism.



15
16
17
18
# File 'lib/sentry/interfaces/mechanism.rb', line 15

def initialize(type: "generic", handled: true)
  @type = type
  @handled = handled
end

Instance Attribute Details

#handledBoolean

A manually captured exception has handled set to true, false if coming from an integration where we intercept an uncaught exception. Defaults to true here and will be set to false explicitly in integrations.

Returns:

  • (Boolean)


13
14
15
# File 'lib/sentry/interfaces/mechanism.rb', line 13

def handled
  @handled
end

#typeString

Generic identifier, mostly the source integration for this exception.

Returns:

  • (String)


7
8
9
# File 'lib/sentry/interfaces/mechanism.rb', line 7

def type
  @type
end