Class: Landlock::CommandError

Inherits:
Error
  • Object
show all
Defined in:
lib/landlock/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, stdout: "", stderr: "", status: nil, result: nil) ⇒ CommandError

Returns a new instance of CommandError.



20
21
22
23
24
25
26
# File 'lib/landlock/errors.rb', line 20

def initialize(message, stdout: "", stderr: "", status: nil, result: nil)
  @stdout = stdout
  @stderr = stderr
  @status = status
  @result = result
  super(message)
end

Instance Attribute Details

#resultObject (readonly)

Returns the value of attribute result.



18
19
20
# File 'lib/landlock/errors.rb', line 18

def result
  @result
end

#statusObject (readonly)

Returns the value of attribute status.



18
19
20
# File 'lib/landlock/errors.rb', line 18

def status
  @status
end

#stderrObject (readonly)

Returns the value of attribute stderr.



18
19
20
# File 'lib/landlock/errors.rb', line 18

def stderr
  @stderr
end

#stdoutObject (readonly)

Returns the value of attribute stdout.



18
19
20
# File 'lib/landlock/errors.rb', line 18

def stdout
  @stdout
end