Exception: RKSeal::CommandError
- Defined in:
- lib/rkseal/errors.rb
Overview
An external command ran but exited non-zero. Carries the command label, exit status, and captured stderr so callers can surface a useful message without re-deriving them.
Instance Attribute Summary collapse
-
#command ⇒ String
readonly
Human label for the command (e.g. “kubeseal seal”).
-
#status ⇒ Integer?
readonly
Process exit status, if one was produced.
-
#stderr ⇒ String?
readonly
Captured stderr (already scrubbed of secrets).
Instance Method Summary collapse
-
#initialize(message = nil, command: nil, status: nil, stderr: nil) ⇒ CommandError
constructor
A new instance of CommandError.
Constructor Details
#initialize(message = nil, command: nil, status: nil, stderr: nil) ⇒ CommandError
Returns a new instance of CommandError.
40 41 42 43 44 45 |
# File 'lib/rkseal/errors.rb', line 40 def initialize( = nil, command: nil, status: nil, stderr: nil) @command = command @status = status @stderr = stderr super() end |
Instance Attribute Details
#command ⇒ String (readonly)
Returns human label for the command (e.g. “kubeseal seal”).
30 31 32 |
# File 'lib/rkseal/errors.rb', line 30 def command @command end |
#status ⇒ Integer? (readonly)
Returns process exit status, if one was produced.
32 33 34 |
# File 'lib/rkseal/errors.rb', line 32 def status @status end |
#stderr ⇒ String? (readonly)
Returns captured stderr (already scrubbed of secrets).
34 35 36 |
# File 'lib/rkseal/errors.rb', line 34 def stderr @stderr end |