Exception: SystemExit

Inherits:
Exception show all
Defined in:
lib/laser/standard_library/exceptions.rb

Constant Summary

EXIT_SUCCESS =
0

Constants inherited from Exception

Exception::BT_FAILURE_MESSAGE

Instance Method Summary (collapse)

Methods inherited from Exception

#backtrace, #set_backtrace, #to_s

Constructor Details

- (SystemExit) initialize(val = nil, msg = nil)



34
35
36
37
38
39
40
41
# File 'lib/laser/standard_library/exceptions.rb', line 34

def initialize(val=nil, msg=nil)
  if Fixnum === val
    @__status__ = val
    super(msg)
  else
    super(val)
  end
end

Instance Method Details

- (Object) status



42
43
44
# File 'lib/laser/standard_library/exceptions.rb', line 42

def status
  @__status__
end

- (Boolean) success?



45
46
47
# File 'lib/laser/standard_library/exceptions.rb', line 45

def success?
  @__status__.nil? || @__status__ == EXIT_SUCCESS
end