Derive from std::exception

If you found a bug in our library or on our website, please report it in this section. In this forum you can also make concrete suggestions or feature requests.

Moderators: CEGUI MVP, CEGUI Team

vr
Just popping in
Just popping in
Posts: 19
Joined: Thu Oct 12, 2006 20:57

Derive from std::exception

Postby vr » Tue Nov 28, 2006 13:42

Hi all.

You have all done a good job all this CEGUI stuff.

There is however one thing that Im a little disturbed about. (for now...)


There is a class Exception that does not derive from std::exception.
This makes it impossible to catch an exception thrown from CEGUI unless you catch it with ... or the explicit CEGUI exception.

Now, why would this be a problem?
Consider using the lua integration of CEGUI.

I have a dynamic pluginsystem where I have all of the CEGUI functionality compiled into a dynamic library (.dll).

THis is loaded from the app like:

scriptMgr->requestPlugin("cegui") // load and register the CEGUI specific stuff in a general LUA state.

What I can do then is execute lua code from my main app without linking to the CEGUI library at all. Such as:

scriptMgr->doString("CEGUI.SchemeManager:getSingleton():loadScheme("WindowsLook.scheme");

this works just fine, except if there is a problem of loading the sceme (or font or whatever problem there can be), then CEGUI throws an exception.
As I said earlier, there is no way for me to catch this, except of using (...) catch clausule, or by including the CEGUIExceptions.h which makes Main aware of something called CEGUI, which Im trying to avoid...(this goes for a lot other packages handled the same way).

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

Postby gcarlton » Thu Dec 14, 2006 08:37

This has my vote too. Should definitely be done for the next release.

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Postby lindquist » Thu Dec 14, 2006 11:00

I have no problem with this change!


Return to “Bug Reports, Suggestions, Feature Requests”

Who is online

Users browsing this forum: No registered users and 3 guests