Method: Sentry::SingleExceptionInterface#initialize
- Defined in:
- lib/sentry/interfaces/single_exception.rb
#initialize(exception:, mechanism:, stacktrace: nil) ⇒ SingleExceptionInterface
Returns a new instance of SingleExceptionInterface.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/sentry/interfaces/single_exception.rb', line 17 def initialize(exception:, mechanism:, stacktrace: nil) @type = exception.class.to_s = if exception.respond_to?(:detailed_message) exception.(highlight: false) else exception. || "" end = .inspect unless .is_a?(String) @value = Utils::EncodingHelper.encode_to_utf_8(.byteslice(0..Event::MAX_MESSAGE_SIZE_IN_BYTES)) @module = exception.class.to_s.split("::")[0...-1].join("::") @thread_id = Thread.current.object_id @stacktrace = stacktrace @mechanism = mechanism end |