diff options
Diffstat (limited to 'lib/slop/error.rb')
-rw-r--r-- | lib/slop/error.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/slop/error.rb b/lib/slop/error.rb index ddfa1a7..b83cab3 100644 --- a/lib/slop/error.rb +++ b/lib/slop/error.rb @@ -38,4 +38,16 @@ module Slop # Suppress with the `suppress_errors` config option. class MissingRequiredOption < Error end + + # Raised when a given option is provided by the user and does not + # match the expected format for that type. This is only raised if + # validate_types is set to true. + class InvalidOptionValue < Error + attr_reader :flag + + def initialize(msg, flag) + super(msg) + @flag = flag + end + end end |