aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/vendor/thor-0.11.2/lib/thor/error.rb
blob: c846e9ce74eda7115d414efcb02b5603ab581e5b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
class Thor
  # Thor::Error is raised when it's caused by the user invoking the task and
  # only errors that inherit from it are rescued.
  #
  # So, for example, if the developer declares a required argument after an
  # option, it should raise an ::ArgumentError and not ::Thor::ArgumentError,
  # because it was caused by the developer and not the "final user".
  #
  class Error < StandardError #:nodoc:
  end

  # Raised when a task was not found.
  #
  class UndefinedTaskError < Error #:nodoc:
  end

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

  class RequiredArgumentMissingError < InvocationError #:nodoc:
  end

  class MalformattedArgumentError < InvocationError #:nodoc:
  end
end