Sha256: cabaa62996163c9d2999594fbba7c6711b5136ecd8286222acd2d630b8fb9f22

Contents?: true

Size: 393 Bytes

Versions: 22

Compression:

Stored size: 393 Bytes

Contents

module Clamp
  
  class Error < StandardError

    def initialize(message, command)
      super(message)
      @command = command
    end

    attr_reader :command

  end

  # raise to signal incorrect command usage
  class UsageError < Error; end

  # raise to request usage help
  class HelpWanted < Error

    def initialize(command)
      super("I need help", command)
    end

  end

end

Version data entries

22 entries across 22 versions & 3 rubygems

Version Path
clamp-0.5.1 lib/clamp/errors.rb
clamp-0.5.0 lib/clamp/errors.rb
clamp-0.4.0 lib/clamp/errors.rb
jls-clamp-0.3.1.2 lib/clamp/errors.rb
jls-clamp-0.3.1 lib/clamp/errors.rb
clamp-0.3.1 lib/clamp/errors.rb
clamp-0.3.0 lib/clamp/errors.rb
clamp-0.2.3 lib/clamp/errors.rb
clamp-0.2.2 lib/clamp/errors.rb
clamp-0.2.1 lib/clamp/errors.rb
clamp-0.2.0 lib/clamp/errors.rb
wpb-0.0.5 lib/wpb/clamp/errors.rb
clamp-0.1.8 lib/clamp/errors.rb
clamp-0.1.7 lib/clamp/errors.rb
clamp-0.1.6 lib/clamp/errors.rb
clamp-0.1.5 lib/clamp/errors.rb
clamp-0.1.4 lib/clamp/errors.rb
clamp-0.1.3 lib/clamp/errors.rb
clamp-0.1.2 lib/clamp/errors.rb
clamp-0.1.1 lib/clamp/errors.rb