
On Mon, Jun 15, 2009 at 3:59 PM, Mathias Gaunard<mathias.gaunard@ens-lyon.org> wrote:
Felipe Magno de Almeida wrote:
How do you handle exceptions in Qt?
I don't. Cppgui is exception neutral. Do you foresee a problem? I must be honest, I haven't considered this at all.
Exceptions are a serious matter.
They sure are. I just never considered that cppgui would have to catch anything. It is strongly RAII-based, even all windows are handled with specific smart pointers that explicit the shared ownership of the windows.
Qt uses exceptions alright (most notably from usage of new), but is not aware of it and does as if it doesn't.
I didn't know that.
It is perfectly fine not to use exceptions, but if you do you have to stick to specific coding standards that are in contradiction with the recommended practice of using exceptions and RAII.
Sure, I understand. I don't want that too.
Qt lives in the no-exceptions make-believe land, which is really the worst of both worlds.
I agree. I want my programs to be robust in case of failures, and I want maintenence to be the easiest possible, so exceptions are to me the obvious answer.
I am personally quite against a library that would have the same deficiencies.
Me too. But I'm a bit lost how to handle this with Qt. I'll do some research and see what I can actually do to help this situation. Maybe moving exceptions with boost.exception library might be a possible solution (?). Thanks, -- Felipe Magno de Almeida