faure at kde.org
Wed Jul 9 09:45:41 BST 2014
On Wednesday 09 July 2014 10:23:59 Kevin Ottens wrote:
> On Wednesday 09 July 2014 10:15:03 David Faure wrote:
> > On Saturday 28 June 2014 08:51:42 Rodrigo Bonifacio wrote:
> > > Dear all, is there any code guideline that recommends developers to
> > > avoid
> > > the use of exception handling mechanisms within the core libraries of
> > > KDE?
> > I don't think it's written down anywhere, but yes, please do avoid the use
> > of exception handling. I hate debugging uncaught exceptions, no way to get
> > a backtrace of where the exception was thrown.
> Isn't "catch throw" in gdb just for that? I regularly use it when I've to
> deal with exceptions.
Good tip, but I meant: if the bug isn't easily reproducible.
E.g. I had that a few times with the exceptions thrown by xapian at random
times. KMail crashes, backtrace is useless, and doing the same operation as a
user doesn't lead to the exception being thrown again, it's rather related to
some background operation happening at random times.
Sure I could have run kmail in gdb all day, but it only crashed once a month
or so. Being able to inspect a core dump is a lot simpler.
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 190 bytes
Desc: This is a digitally signed message part.
More information about the kde-core-devel