Exception: Cosmos::ConfigParser::Error
- Defined in:
- lib/cosmos/config/config_parser.rb
Overview
Error which gets raised by ConfigParser in #verify_num_parameters. This is also the error that classes using ConfigParser should raise when they encounter a configuration error.
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#keyword ⇒ Object
readonly
Returns the value of attribute keyword.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#line_number ⇒ Object
readonly
Returns the value of attribute line_number.
-
#parameters ⇒ Object
readonly
Returns the value of attribute parameters.
-
#url ⇒ String
readonly
URL which points to usage documentation on the COSMOS Wiki.
-
#usage ⇒ String
readonly
The usage string representing how this keyword should be formatted.
Instance Method Summary collapse
-
#initialize(config_parser, message = "Configuration Error", usage = "", url = "") ⇒ Error
constructor
Create an Error with the specified Config data.
Constructor Details
#initialize(config_parser, message = "Configuration Error", usage = "", url = "") ⇒ Error
Create an Error with the specified Config data
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
# File 'lib/cosmos/config/config_parser.rb', line 114 def initialize(config_parser, = "Configuration Error", usage = "", url = "") if Error == super(.) elsif Exception == super("#{message.class}:#{message.message}") else super() end @keyword = config_parser.keyword @parameters = config_parser.parameters @filename = config_parser.filename @line = config_parser.line @line_number = config_parser.line_number @usage = usage @url = url end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
93 94 95 |
# File 'lib/cosmos/config/config_parser.rb', line 93 def filename @filename end |
#keyword ⇒ Object (readonly)
Returns the value of attribute keyword.
93 94 95 |
# File 'lib/cosmos/config/config_parser.rb', line 93 def keyword @keyword end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
93 94 95 |
# File 'lib/cosmos/config/config_parser.rb', line 93 def line @line end |
#line_number ⇒ Object (readonly)
Returns the value of attribute line_number.
93 94 95 |
# File 'lib/cosmos/config/config_parser.rb', line 93 def line_number @line_number end |
#parameters ⇒ Object (readonly)
Returns the value of attribute parameters.
93 94 95 |
# File 'lib/cosmos/config/config_parser.rb', line 93 def parameters @parameters end |
#url ⇒ String (readonly)
Returns URL which points to usage documentation on the COSMOS Wiki.
101 102 103 |
# File 'lib/cosmos/config/config_parser.rb', line 101 def url @url end |
#usage ⇒ String (readonly)
Returns The usage string representing how this keyword should be formatted.
97 98 99 |
# File 'lib/cosmos/config/config_parser.rb', line 97 def usage @usage end |