Class: IMW::SystemCallError
Overview
An error meant to be used when a system call goes awry. It will report exit status and the process id of the offending call.
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
- #display ⇒ Object
-
#initialize(status, message) ⇒ SystemCallError
constructor
A new instance of SystemCallError.
- #to_s ⇒ Object
Constructor Details
#initialize(status, message) ⇒ SystemCallError
Returns a new instance of SystemCallError.
34 35 36 37 |
# File 'lib/imw/utils/error.rb', line 34 def initialize(status, ) @status = status @message = end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
32 33 34 |
# File 'lib/imw/utils/error.rb', line 32 def @message end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
32 33 34 |
# File 'lib/imw/utils/error.rb', line 32 def status @status end |
Instance Method Details
#display ⇒ Object
39 40 41 |
# File 'lib/imw/utils/error.rb', line 39 def display "(error code: #{status.exitstatus}, pid: #{status.pid}) #{}" end |
#to_s ⇒ Object
43 44 45 |
# File 'lib/imw/utils/error.rb', line 43 def to_s "(error code: #{status.exitstatus}, pid: #{status.pid}) #{}" end |