Sha256: c0684cd4d1536892100895754bc8966742cf79375980e36377417e9653a1bc3a

Contents?: true

Size: 760 Bytes

Versions: 9

Compression:

Stored size: 760 Bytes

Contents

module CommandLine
  
  # Commandline parsing errors and exceptions
  class Error < Exception
  end

  # Missing a required flag
  class FlagMissing < CommandLine::Error
  end

  # Missing a required file
  class FileMissing < CommandLine::Error
  end

  # Missing a required flag argument
  class FlagExpectsArgument < CommandLine::Error
    def initialize(flag)
      super("#{flag} expects an argument!")
    end    
  end

  # Missing a required command
  class CommandMissing < CommandLine::Error
    def initialize(msg = "A command is missing")
      super(msg)
    end
    
  end

  # Encountered an unkown flag
  class UnknownFlag < CommandLine::Error
    def initialize(flag)
      super("#{flag} not recognized as a valid flag!")
    end
  end
  
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
lackac-request-log-analyzer-0.1.3 lib/command_line/exceptions.rb
wvanbergen-request-log-analyzer-0.1.0 lib/command_line/exceptions.rb
wvanbergen-request-log-analyzer-0.1.1 lib/command_line/exceptions.rb
wvanbergen-request-log-analyzer-0.1.2 lib/command_line/exceptions.rb
wvanbergen-request-log-analyzer-0.2.2 lib/command_line/exceptions.rb
wvanbergen-request-log-analyzer-0.3.0 lib/command_line/exceptions.rb
wvanbergen-request-log-analyzer-0.3.2 lib/command_line/exceptions.rb
wvanbergen-request-log-analyzer-0.3.3 lib/command_line/exceptions.rb
wvanbergen-request-log-analyzer-0.3.4 lib/command_line/exceptions.rb