[Qt-interest] error handling patterns with regard to (qt) gui programming
Matthias Dahl
ml_qt-interest at binary-island.eu
Tue Jul 19 19:13:42 CEST 2011
Hello everyone.
Coming from a more server/client related background where I had to write tools,
clients and servers (with some very nice detours to graphics programming), I've
just recently made the serious step up to gui programming and I've been asking
myself ever since if any good design patterns exist for error handling within
a gui program.
I've read mostly that one should prefer lower level error handling because that
is where most informations about the error are available. Yet I find it hard to
open a QErrorMessage in some GUI unrelated part of the code where for example a
database connection is handled.
Throwing exceptions is naturally partly a way out. But imho exceptions are only
for serious or fatal problems and not a general solution. That and there's also
the possible performance impact and the usual (design) pitfalls.
So I'd like to ask how you guys handle errors in your own programs? Are there
any commonalities or patterns you follow? Or maybe some tips?
Thanks a lot in advance for the input...
So long,
matthias
More information about the Qt-interest-old
mailing list