Problem with using YAML for configuration files

Discussion in 'Ruby' started by Eli Bendersky, May 12, 2007.

  1. 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
    Eli Bendersky, May 12, 2007
    #1
    1. Advertising

  2. Eli Bendersky

    Guest

    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
    , May 12, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. RubyQuestions
    Replies:
    0
    Views:
    214
    RubyQuestions
    Dec 3, 2003
  2. Paul Battley

    YAML.dump/YAML.load bug

    Paul Battley, Aug 3, 2005, in forum: Ruby
    Replies:
    0
    Views:
    169
    Paul Battley
    Aug 3, 2005
  3. Eric Promislow
    Replies:
    4
    Views:
    198
    Eric Promislow
    Oct 31, 2006
  4. Joshua Choi

    yaml.rb and YAML "%" directives

    Joshua Choi, Jan 14, 2007, in forum: Ruby
    Replies:
    1
    Views:
    156
  5. Fransiscus Xaverius

    YAML Problem YAML::Object

    Fransiscus Xaverius, Dec 14, 2007, in forum: Ruby
    Replies:
    2
    Views:
    145
    Fransiscus Xaverius
    Dec 14, 2007
Loading...

Share This Page