Exception: Docker::Error
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Docker::Error
- Defined in:
- lib/docker/error.rb
Instance Attribute Summary collapse
-
#detail ⇒ Object
readonly
Returns the value of attribute detail.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(cmd, status, detail) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(cmd, status, detail) ⇒ Error
Returns a new instance of Error.
8 9 10 11 12 13 14 |
# File 'lib/docker/error.rb', line 8 def initialize(cmd, status, detail) @status = status @detail = detail brief = detail.split("\n").first || '(no output)' = format("'%s' failed with status %d: %s", cmd, status, brief) super() end |
Instance Attribute Details
#detail ⇒ Object (readonly)
Returns the value of attribute detail.
3 4 5 |
# File 'lib/docker/error.rb', line 3 def detail @detail end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
3 4 5 |
# File 'lib/docker/error.rb', line 3 def status @status end |