diff options
Diffstat (limited to 'railties/lib/vendor/thor-0.11.3/lib/thor/error.rb')
-rw-r--r-- | railties/lib/vendor/thor-0.11.3/lib/thor/error.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/railties/lib/vendor/thor-0.11.3/lib/thor/error.rb b/railties/lib/vendor/thor-0.11.3/lib/thor/error.rb new file mode 100644 index 0000000000..c846e9ce74 --- /dev/null +++ b/railties/lib/vendor/thor-0.11.3/lib/thor/error.rb @@ -0,0 +1,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 |