Sha256: 9c9f0a02ceb30aab8d5d0d42fcc42063dacbf93e9fffadc6e960fb1161ad39f1

Contents?: true

Size: 443 Bytes

Versions: 15

Compression:

Stored size: 443 Bytes

Contents

module Geny
  # A base class for all errors
  class Error < StandardError
  end

  # Raised when a command cannot be found.
  class NotFoundError < Error
  end

  # Raised when a shell command exits with a non-zero status.
  class ExitError < Error
    attr_reader :code, :command

    def initialize(code:, command:)
      @code = code
      @command = command
      super "Command `#{command}` failed (exit code: #{code})"
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
geny-2.5.2 lib/geny/error.rb
geny-2.5.1 lib/geny/error.rb
geny-2.5.0 lib/geny/error.rb
geny-2.4.0 lib/geny/error.rb
geny-2.3.0 lib/geny/error.rb
geny-2.2.0 lib/geny/error.rb
geny-2.1.4 lib/geny/error.rb
geny-2.1.3 lib/geny/error.rb
geny-2.1.2 lib/geny/error.rb
geny-2.1.1 lib/geny/error.rb
geny-2.1.0 lib/geny/error.rb
geny-2.0.0 lib/geny/error.rb
geny-1.0.1 lib/geny/error.rb
geny-1.0.0 lib/geny/error.rb
geny-0.1.0 lib/geny/error.rb