Closed adityam closed 14 years ago
Hi,
The new import mechanism is amazing. Thanks a lot for implementing it. However, I think that the error messages can be improved.
Consider a config.yaml file that contains
import:
wmii gives an error
#<TypeError: can't convert nil into String> /usr/lib/ruby/1.9.1/yaml.rb:143:in `initialize' /usr/lib/ruby/1.9.1/yaml.rb:143:in `open' /usr/lib/ruby/1.9.1/yaml.rb:143:in `load_file' /home/adityam/.wmii-hg/lib/wmiirc/config.rb:112:in `block in import' /home/adityam/.wmii-hg/lib/wmiirc/config.rb:110:in `each' /home/adityam/.wmii-hg/lib/wmiirc/config.rb:110:in `import' /home/adityam/.wmii-hg/lib/wmiirc/config.rb:122:in `block in import' /home/adityam/.wmii-hg/lib/wmiirc/config.rb:110:in `each' /home/adityam/.wmii-hg/lib/wmiirc/config.rb:110:in `import' /home/adityam/.wmii-hg/lib/wmiirc/config.rb:14:in `initialize' /home/adityam/.wmii-hg/lib/wmiirc/loader.rb:85:in `new' /home/adityam/.wmii-hg/lib/wmiirc/loader.rb:85:in `load_user_config' /home/adityam/.wmii-hg/lib/wmiirc/loader.rb:19:in `run' /home/adityam/.wmii-hg/wmiirc:9:in `<main>'
The message can't convert nil to string is misleading. It will be better if the error message said that file was not found, or simply give a warning rather than an error.
can't convert nil to string
Good idea. Solved in sunaku/wmiirc@16b484c8480de3f47ea72ae823371d3f021403eb. Closing.
Hi,
The new import mechanism is amazing. Thanks a lot for implementing it. However, I think that the error messages can be improved.
Consider a config.yaml file that contains
import:
wmii gives an error
The message
can't convert nil to string
is misleading. It will be better if the error message said that file was not found, or simply give a warning rather than an error.