Exception: Lumberjack::Beats::Connection::ConnectionClosed

Inherits:
StandardError
  • Object
show all
Defined in:
lib/lumberjack/beats/server.rb

Overview

Wrap the original exception into a common one, to make upstream managing and reporting easier But lets make sure we keep the meaning of the original exception.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(original_exception) ⇒ ConnectionClosed

Returns a new instance of ConnectionClosed.



396
397
398
399
400
401
# File 'lib/lumberjack/beats/server.rb', line 396

def initialize(original_exception)
  super(original_exception)

  @original_exception = original_exception
  set_backtrace(original_exception.backtrace) if original_exception
end

Instance Attribute Details

#original_exceptionObject (readonly)

Returns the value of attribute original_exception.



394
395
396
# File 'lib/lumberjack/beats/server.rb', line 394

def original_exception
  @original_exception
end

Instance Method Details

#to_sObject



403
404
405
# File 'lib/lumberjack/beats/server.rb', line 403

def to_s
  "#{self.class.name} wrapping: #{original_exception.class.name}, #{super.to_s}"
end