Sha256: 6634f1a2f3ea1becea338e72d50a80ada780eea372b299fffff90d3839801af9

Contents?: true

Size: 920 Bytes

Versions: 20

Compression:

Stored size: 920 Bytes

Contents

module Kameleon
  class Error < ::StandardError
    attr_accessor :object

    def initialize(message=nil, object=nil)
      super(message)
      self.object = object
    end

    def self.status_code(code)
      define_method(:status_code) { code }
    end
  end

  class Exit < Error; status_code(0) ; end
  class KameleonError < Error; status_code(1) ; end
  class ExecError < Error; status_code(2) ; end
  class InternalError < Error; status_code(3) ; end
  class ContextError < Error; status_code(4) ; end
  class ContextClosed < Error; status_code(4) ; end
  class ShellError < Error; status_code(5) ; end
  class ShellExited < Error; status_code(5) ; end
  class RecipeError < Error; status_code(6) ; end
  class BuildError < Error; status_code(7) ; end
  class AbortError < Error; status_code(8) ; end
  class TemplateNotFound < Error; status_code(9) ; end
  class CacheError < Error; status_code(10) ; end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
kameleon-builder-2.9.4 lib/kameleon/error.rb
kameleon-builder-2.9.2 lib/kameleon/error.rb
kameleon-builder-2.9.1 lib/kameleon/error.rb
kameleon-builder-2.9.0 lib/kameleon/error.rb
kameleon-builder-2.8.3 lib/kameleon/error.rb
kameleon-builder-2.8.2 lib/kameleon/error.rb
kameleon-builder-2.8.1 lib/kameleon/error.rb
kameleon-builder-2.7.8 lib/kameleon/error.rb
kameleon-builder-2.7.7 lib/kameleon/error.rb
kameleon-builder-2.7.6 lib/kameleon/error.rb
kameleon-builder-2.7.5 lib/kameleon/error.rb
kameleon-builder-2.7.4 lib/kameleon/error.rb
kameleon-builder-2.7.3 lib/kameleon/error.rb
kameleon-builder-2.7.2 lib/kameleon/error.rb
kameleon-builder-2.7.1 lib/kameleon/error.rb
kameleon-builder-2.7.0 lib/kameleon/error.rb
kameleon-builder-2.6.7 lib/kameleon/error.rb
kameleon-builder-2.6.6 lib/kameleon/error.rb
kameleon-builder-2.6.5 lib/kameleon/error.rb
kameleon-builder-2.6.3 lib/kameleon/error.rb