Archived
This forum has been archived. Please start a new discussion on GitHub.
How can i use the function getpropertyforprefix()?
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
-
What kind of exception does it throw?0
-
haha
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 sincerely0 -
Hi terminate
can you say what exception is raised?
with out this info is dificult help you0