Thiago Macieira wrote:

> Jonas Widarsson wrote:
>>I've learned that there is some kind of decision made for KDE to not use

> No.
> KDE libraries don't use exceptions unnecessarily. KDE programs are fully
> free to use them if they want.

But it's a bit hard to use them. Say, there's 30 KActions that are connected
to 30 slots. Each slot calls some other functions, and all of them might
throw. Since KAction is from kdelibs, it has no catch statements. So I
either have to:

1. Add "try/catch" in each of 30 slots
2. Introduce 30 new function and use heavy template magic, or macros, to
call those 30 new function from slots with added try/catch.

An ideal solution would be to have some base KException class, and a signal
KApplication:nException(KException&) that I can connect to for error
reporting. But implementing that would require lots of try/catch inside
kdelibs, so I'm not sure that's workable.

- Volodya

>> Visit to unsubscribe <<