Menu

Misterious crash

Help
Wolfgang
2011-04-24
2013-04-22
  • Wolfgang

    Wolfgang - 2011-04-24

    Hello together,

    i'am new to Nini but i thought to understand it.
    But i have a problem i could not figure out.
    As long as the INI-file and the entry exists all is ok.
    But when the INI-file not exists trying
    source = new IniConfigSource(strConfigFile);
    crashes. Same when the section or key not exists
    return source.Configs.GetString(strKey, strDefault);
    crashes, although a given defaultvalue.

    Is'nt it so that Nini creates a empty config-class and saves it
    on request to the given filename?
    And the GetString with given default should not crash in my
    opinion if the section/key not exists. Am I wrong?

    Any suggestion what is going wrong here?

    P.S. source.AutoSave  is set to true;

    Greetings

     
  • Brent R. Matzelle

    It sounds like your application might not have write permission to the INI file. 

    It should throw a stack trace.  Please post if if you have further problems. 

     

Log in to post a comment.

MongoDB Logo MongoDB