Exception: Docker::Compose::Error
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Docker::Compose::Error
- Defined in:
- lib/docker/compose/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.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/docker/compose/error.rb', line 9 def initialize(cmd, status, detail) @status = status @detail = detail brief = detail.split("\n").first || '(no output)' case status when Numeric status = status.to_s else status = "'#{status}'" end = format("'%s' failed with status %s: %s", cmd, status, brief) super() end |
Instance Attribute Details
#detail ⇒ Object (readonly)
Returns the value of attribute detail.
4 5 6 |
# File 'lib/docker/compose/error.rb', line 4 def detail @detail end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
4 5 6 |
# File 'lib/docker/compose/error.rb', line 4 def status @status end |