Exception: Hoosegow::ImageBuildError

Inherits:
Error
  • Object
show all
Defined in:
lib/hoosegow/exceptions.rb

Overview

Errors while building the Docker image.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message) ⇒ ImageBuildError

Returns a new instance of ImageBuildError.



7
8
9
10
11
12
13
# File 'lib/hoosegow/exceptions.rb', line 7

def initialize(message)
  if message.is_a?(Hash)
    @detail = message['errorDetail']
    message = message['error']
  end
  super(message)
end

Instance Attribute Details

#detailObject (readonly)

The error details from docker.

Example:

{"code" => 127, "message" => "The command [/bin/sh -c boom] returned a non-zero code: 127"}


19
20
21
# File 'lib/hoosegow/exceptions.rb', line 19

def detail
  @detail
end