I reread docs and understood that scope not for such case.

Next code is do what I need:
try
{
        string dbname = config.getKey("dbname");
        string dbpass = config.getKey("dbpass");
        string dbhost = config.getKey("dbhost");
        string dbport = config.getKey("dbport");
}

catch (Exception msg)
{
        writeln("Can't parse config: %s", msg.msg);
}

Reply via email to