Exception: Rex::ArgumentError

Inherits:
ArgumentError
  • Object
show all
Includes:
Exception
Defined in:
lib/rex/exceptions.rb

Overview

This exception is raised when an invalid argument is supplied to a method.

Instance Method Summary collapse

Constructor Details

#initialize(message = nil) ⇒ ArgumentError


57
58
59
# File 'lib/rex/exceptions.rb', line 57

def initialize(message = nil)
  @message = message
end

Instance Method Details

#to_sObject


61
62
63
64
65
66
67
# File 'lib/rex/exceptions.rb', line 61

def to_s
  str = 'An invalid argument was specified.'
  if @message
    str << " #{@message}"
  end
  str
end