How can i use the function getpropertyforprefix()?

in Help Center
Hi:
I want get the parameters from my config file,following is the code:
1. Ice::PropertiesPtr properties;
2. Ice::PropertyDict proDict;
3. properties = Ice::createProperties();
4. properties->load(path);
5. proDict = properties->getPropertiesForPrefix("filesystem");
when arrives at line 5,the program throws out an exception.
But when I use function properties->getPropertyAsIntWithDefault(segName + "." + key,defVal) ,there is no error.
can you give me some help??
I want get the parameters from my config file,following is the code:
1. Ice::PropertiesPtr properties;
2. Ice::PropertyDict proDict;
3. properties = Ice::createProperties();
4. properties->load(path);
5. proDict = properties->getPropertiesForPrefix("filesystem");
when arrives at line 5,the program throws out an exception.
But when I use function properties->getPropertyAsIntWithDefault(segName + "." + key,defVal) ,there is no error.
can you give me some help??
0
Comments
Hi:
I have got it.
If the program runs in the state of debugging,It throws out exception.
But if it runs normally,it is ok!!
your sincerely
can you say what exception is raised?
with out this info is dificult help you
Because I don't know which exception is throwed out,I can't describe it.
The programm just pops up a message box of system, which show in the attachment.
read this faq for more info about the problem