Sha256: 2328e2443db7f0ce28463d92cfbc13e278dc8c0c187d4cab8706301e78c27a39

Contents?: true

Size: 696 Bytes

Versions: 8

Compression:

Stored size: 696 Bytes

Contents

class Hoosegow
  # General error for others to inherit from.
  class Error < StandardError; end

  # Errors while building the Docker image.
  class ImageBuildError < Error
    def initialize(message)
      if message.is_a?(Hash)
        @detail = message['errorDetail']
        message = message['error']
      end
      super(message)
    end

    # The error details from docker.
    #
    # Example:
    #     {"code" => 127, "message" => "The command [/bin/sh -c boom] returned a non-zero code: 127"}
    attr_reader :detail
  end

  # Errors while importing dependencies
  class InmateImportError < Error; end

  # Errors while running an inmate
  class InmateRuntimeError < Error; end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
hoosegow-1.2.7 lib/hoosegow/exceptions.rb
hoosegow-1.2.6 lib/hoosegow/exceptions.rb
hoosegow-1.2.5 lib/hoosegow/exceptions.rb
hoosegow-1.2.4 lib/hoosegow/exceptions.rb
hoosegow-1.2.3 lib/hoosegow/exceptions.rb
hoosegow-1.2.2 lib/hoosegow/exceptions.rb
hoosegow-1.2.1 lib/hoosegow/exceptions.rb
hoosegow-1.2.0 lib/hoosegow/exceptions.rb