Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Problem with using YAML for configuration files

Reply
Thread Tools

Problem with using YAML for configuration files

 
 
Eli Bendersky
Guest
Posts: n/a
 
      05-12-2007
Hello,

I'm using YAML for configuration files in my current Ruby application,
and the yaml.rb module to load them (YAML::load is about all I use).

One problem I ran into is error reporting, on the semantic level (not
YAML errors). Say a user makes an error in some configuration item,
and I want to emit a useful error message that will guide him to the
problem. This isn't easy at all with YAML, since after YAML::load all
I have is a hash table, completely detached from the actual
configuration file. And I'd really want to let the user know, for
instance, on which line the error occurred.

This is probably a general YAML problem rather than a Ruby problem,
but I'd still like to ask here whether anyone ever encountered this ?
What are the solutions, in your opinion ?

Thanks in advance
Eli

 
Reply With Quote
 
 
 
 
alexander@fork.de
Guest
Posts: n/a
 
      05-12-2007
dear sender,
i´m out of the office until may 29th.
your email will not be forwarded.
for urgent stuff please contact
kind regards,
alexander





 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
YAML Problem YAML::Object Fransiscus Xaverius Ruby 2 12-14-2007 09:17 PM
yaml.rb and YAML "%" directives Joshua Choi Ruby 1 01-14-2007 07:53 AM
Puzzling over why ri can open the std ruby/ri .yaml files, but raw yaml can't Eric Promislow Ruby 4 10-31-2006 10:15 PM
YAML.dump/YAML.load bug Paul Battley Ruby 0 08-03-2005 08:28 PM
YAML Question: Using YAML::YamlNode#transform Method to get float values? RubyQuestions Ruby 0 12-03-2003 02:15 AM



Advertisments
 



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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57