File: errors.rb

package info (click to toggle)
ruby-tty-prompt 0.23.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,452 kB
  • sloc: ruby: 8,847; makefile: 4
file content (31 lines) | stat: -rw-r--r-- 907 bytes parent folder | download
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
28
29
30
31
# frozen_string_literal: true

module TTY
  class Prompt
    Error = Class.new(StandardError)

    # Raised when wrong parameter is used to configure prompt
    ConfigurationError = Class.new(Error)

    # Raised when type conversion cannot be performed
    ConversionError = Class.new(Error)

    # Raised when the passed in validation argument is of wrong type
    ValidationCoercion = Class.new(Error)

    # Raised when the required argument is not supplied
    ArgumentRequired = Class.new(Error)

    # Raised when the argument validation fails
    ArgumentValidation = Class.new(Error)

    # Raised when the argument is not expected
    InvalidArgument = Class.new(Error)

    # Raised when overriding already defined conversion
    ConversionAlreadyDefined = Class.new(Error)

    # Raised when conversion type isn't registered
    UnsupportedConversion = Class.new(Error)
  end # Prompt
end # TTY