Sha256: ee6bce347449560e6394fb46657fd1823a7e3b3026fb54f09198c4ef17a871cf

Contents?: true

Size: 1.25 KB

Versions: 11

Compression:

Stored size: 1.25 KB

Contents

class Thor
  # Thor::Error is raised when it's caused by wrong usage of thor classes. Those
  # errors have their backtrace suppressed and are nicely shown to the user.
  #
  # Errors that are caused by the developer, like declaring a method which
  # overwrites a thor keyword, SHOULD NOT raise a Thor::Error. This way, we
  # ensure that developer errors are shown with full backtrace.
  class Error < StandardError
  end

  # Raised when a command was not found.
  class UndefinedCommandError < Error
  end
  UndefinedTaskError = UndefinedCommandError

  class AmbiguousCommandError < Error
  end
  AmbiguousTaskError = AmbiguousCommandError

  # Raised when a command was found, but not invoked properly.
  class InvocationError < Error
  end

  class UnknownArgumentError < Error
  end

  class RequiredArgumentMissingError < InvocationError
  end

  class MalformattedArgumentError < InvocationError
  end
  
  # Raised when a combination of conflicting arguments is provided.
  # 
  # @todo
  #   It would be nice to parametrize this.
  # 
  class ConflictingArgumentError < InvocationError
  end
  
  # Raised when an argument is not allowed.
  # 
  # @todo
  #   It would be nice to parametrize this.
  # 
  class ProhibitedArgumentError < InvocationError
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
atli-0.1.13 lib/thor/error.rb
atli-0.1.12 lib/thor/error.rb
atli-0.1.11 lib/thor/error.rb
atli-0.1.10 lib/thor/error.rb
atli-0.1.9 lib/thor/error.rb
atli-0.1.8 lib/thor/error.rb
atli-0.1.7 lib/thor/error.rb
atli-0.1.6 lib/thor/error.rb
atli-0.1.5 lib/thor/error.rb
atli-0.1.4 lib/thor/error.rb
atli-0.1.3 lib/thor/error.rb