I am evaluating KDE as a desktop environment and need to know how it is
recommended that developers handle errors and report them back to the user.

I have worked quite a bit with C# in the past and had good success using typed
exceptions in the .NET Framework to cleanly separate error handling from the
normal logic of the program itself. However, though unsuccessful at finding
much documentation on best practices for error handling in KDE (or in QT for
that matter), I have seen some discussion that C++ exceptions should be avoided
as otherwise significant performance penalties are incurred. On the other hand,
I have found that checking return values, as I have seen in Qt samples) after
each method call is unwieldy and distracting to program.

In the .NET Framework, I would have done the following (illustrated using a
call stack):

foo();
blah();
bar();

If bar() ran into a problem, then I could raise a typed exception, catch it at
the outer end (i.e., in foo()) and report the message in foo(). This is
especially important where blah() and bar() in a separate, re-used class or
even shared library and would not know how the error should be reported in the
client (i.e., foo()). With an exception, foo() could read the error message
from the typed exception and report as appropriate (e.g., via a dialog or
status bar and/or writing to a log, etc.).

What is the recommend practice for handling errors like this in KDE?

I tried searching on Google for various combinations of the following but did
not find any useful resources:
KDE QT "error handling" "best practices" "design patters"

Reference to documentation or model sample or project code or coding guidelines
would be greatly appreciated.

Thanks,

Jeffrey Brendecke







__________________________________________________ _________
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<