Page 1 of 1

[Solved] CEGUI Exception

Posted: Mon Jun 30, 2014 17:06
by Alundra
Hi,
I didn't went into the sourcecode but I read (I didn't remember where) that CEGUI uses exceptions.
Are they all disabled in release and only used in debug mode ?
It's a performance question.
Thanks

Re: CEGUI Exception

Posted: Mon Jun 30, 2014 17:20
by Kulik
We allow people to disable exceptions but we strongly discourage it. See the CEGUI_THROW macro. I think it was originally provided to rebuke people coming to the forum and claiming that exceptions are too slow.

Unless an exception is actually thrown the runtime performance impact is minimal. Please provide references and *REAL* data why this matters to you. Do you have a real high performance project where this really matters? By all means show us. But show us real data, not 3 sentences of rumours.

CEGUI does not use exceptions for control flow. We use them in *exceptional* cases - really important errors.

Re: CEGUI Exception

Posted: Mon Jun 30, 2014 17:34
by Ident
We don't regularly throw CEGUI exceptions in the internal code. In fact we do not throw them at all, unless something exceptional happens. Pun intended.
Performance is not affected.

Re: CEGUI Exception

Posted: Mon Jun 30, 2014 18:12
by Alundra
Thanks for informations