Exception: System::Exception::WarningException

Inherits:
Exception
  • Object
show all
Defined in:
lib/system/exception.rb

Instance Method Summary collapse

Constructor Details

#initialize(message, command, exit) ⇒ WarningException

Returns a new instance of WarningException.



21
22
23
24
25
# File 'lib/system/exception.rb', line 21

def initialize(message, command, exit)
  @message = message
  @command = command
  @exit = exit
end

Instance Method Details

#to_sObject



27
28
29
30
31
32
33
34
# File 'lib/system/exception.rb', line 27

def to_s
  <<EOF
#{@message}

Command (#{@command}) exiting with code #{@exit}

EOF
end