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.



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

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.



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

def original_exception
  @original_exception
end

Instance Method Details

#to_sObject



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

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