Exception: Kohagi::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/kohagi/errors.rb

Overview

Base for every error the client raises. Carries the process exit code and the captured stderr so the caller can log or branch on them.

Direct Known Subclasses

FatalError, UnsupportedDeviceError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stderr = nil, exit_code: nil) ⇒ Error

Returns a new instance of Error.



9
10
11
12
13
# File 'lib/kohagi/errors.rb', line 9

def initialize(stderr = nil, exit_code: nil)
  @stderr = stderr
  @exit_code = exit_code
  super(build_message(stderr, exit_code))
end

Instance Attribute Details

#exit_codeObject (readonly)

Returns the value of attribute exit_code.



7
8
9
# File 'lib/kohagi/errors.rb', line 7

def exit_code
  @exit_code
end

#stderrObject (readonly)

Returns the value of attribute stderr.



7
8
9
# File 'lib/kohagi/errors.rb', line 7

def stderr
  @stderr
end