Exception: Msf::RPC::ServerException

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/msf/core/rpc/v10/constants.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, error_message, error_class, error_backtrace) ⇒ void

Initializes ServerException.

Parameters:

  • code (Integer)

    An error code.

  • error_message (String)

    An error message.

  • error_class (Exception)

    An error class.

  • error_backtrace (Array)

    A backtrace of the error.



33
34
35
36
37
38
# File 'lib/msf/core/rpc/v10/constants.rb', line 33

def initialize(code, error_message, error_class, error_backtrace)
  self.code          = code
  self.error_message = error_message
  self.error_class   = error_class
  self.error_backtrace = error_backtrace
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



24
25
26
# File 'lib/msf/core/rpc/v10/constants.rb', line 24

def code
  @code
end

#error_backtraceObject

Returns the value of attribute error_backtrace.



24
25
26
# File 'lib/msf/core/rpc/v10/constants.rb', line 24

def error_backtrace
  @error_backtrace
end

#error_classObject

Returns the value of attribute error_class.



24
25
26
# File 'lib/msf/core/rpc/v10/constants.rb', line 24

def error_class
  @error_class
end

#error_messageObject

Returns the value of attribute error_message.



24
25
26
# File 'lib/msf/core/rpc/v10/constants.rb', line 24

def error_message
  @error_message
end

Instance Method Details

#to_sObject



40
41
42
# File 'lib/msf/core/rpc/v10/constants.rb', line 40

def to_s
  "#{self.error_class} #{self.error_message} #{self.error_backtrace}"
end