From kde-devel Sat May 03 07:51:33 2014 From: "Commit Hook" Date: Sat, 03 May 2014 07:51:33 +0000 To: kde-devel Subject: Re: Review Request 117930: Catch more exceptions in Baloo::FileFetchJob::doStart() Message-Id: <20140503075133.31551.33130 () probe ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-devel&m=139910365606078 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============5974207339385492710==" --===============5974207339385492710== Content-Type: multipart/alternative; boundary="===============6961429245355995986==" --===============6961429245355995986== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/117930/#review57177 ----------------------------------------------------------- This review has been submitted with commit 59519f5b7f69d3c661379765b4928355cd2e047d by Frank Reininghaus to branch KDE/4.13. - Commit Hook On May 1, 2014, 1:14 p.m., Frank Reininghaus wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboard.kde.org/r/117930/ > ----------------------------------------------------------- > > (Updated May 1, 2014, 1:14 p.m.) > > > Review request for Baloo. > > > Bugs: 333763 > http://bugs.kde.org/show_bug.cgi?id=333763 > > > Repository: baloo > > > Description > ------- > > https://bugs.kde.org/show_bug.cgi?id=333763 shows that the Xapian database constructor can throw an exception, which is not handled at the moment. This patch wraps all Xapian-related stuff in Baloo::FileFetchJob::doStart() in a try {...} block and catches all exceptions. > > The alternative would be to only add a catch statement for the Xapian::DatabaseOpeningError which seems to be thrown according to the bug report, provided that we can be 100% sure that no other exceptions can be thrown there. IMHO, a library that uses external libraries that can throw exceptions should try as hard as possible to catch all exceptions. > > > Diffs > ----- > > src/file/lib/filefetchjob.cpp 21f5520 > > Diff: https://git.reviewboard.kde.org/r/117930/diff/ > > > Testing > ------- > > Unit tests still pass. > > > Thanks, > > Frank Reininghaus > > --===============6961429245355995986== Content-Type: text/html; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit
This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/117930/

This review has been submitted with commit 59519f5b7f69d3c661379765b4928355cd2e047d by Frank Reininghaus to branch KDE/4.13.

- Commit Hook


On May 1st, 2014, 1:14 p.m. UTC, Frank Reininghaus wrote:

Review request for Baloo.
By Frank Reininghaus.

Updated May 1, 2014, 1:14 p.m.

Bugs: 333763
Repository: baloo

Description

https://bugs.kde.org/show_bug.cgi?id=333763 shows that the Xapian database constructor can throw an exception, which is not handled at the moment. This patch wraps all Xapian-related stuff in Baloo::FileFetchJob::doStart() in a try {...} block and catches all exceptions.

The alternative would be to only add a catch statement for the Xapian::DatabaseOpeningError which seems to be thrown according to the bug report, provided that we can be 100% sure that no other exceptions can be thrown there. IMHO, a library that uses external libraries that can throw exceptions should try as hard as possible to catch all exceptions.

Testing

Unit tests still pass.

Diffs

  • src/file/lib/filefetchjob.cpp (21f5520)

View Diff

--===============6961429245355995986==-- --===============5974207339385492710== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe << --===============5974207339385492710==--