Exception while loading xml files

Forum for general chit-chat or off-topic discussion.

Moderators: CEGUI MVP, CEGUI Team

User avatar
gcarlton
Just can't stay away
Just can't stay away
Posts: 149
Joined: Wed Jan 12, 2005 12:06

Exception while loading xml files

Postby gcarlton » Wed Mar 23, 2005 01:22

This is a minor thing, but whenever I load an xml file now CEGUI throws and then catches an exception. This is because I'm not using a special resource manager and the schema files sit in the same directory as the files I am loading.

I don't really like this because it causes debug logging errors to come up, plus I don't like seeing exceptions in my VS window when I'm not doing anything wrong. :)

For my code, I've ifdefed out the appropriate try() section so it always applies the path, but I wonder if there is a cleaner way to search for files than to just throw an exception and then have another stab at it. Some ideas:
* adding a "query" function to see if a file exists.
* being able to set a working directory.
* passing in an "associated" file so it can get it right first time.

Thoughts?

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Exception while loading xml files

Postby CrazyEddie » Wed Mar 23, 2005 10:05

Your observation is noted and I agree really :)

I think adding a query function to resource provider and making use of that would be the way to go here.

CE.


Return to “Offtopic Discussion”

Who is online

Users browsing this forum: No registered users and 12 guests