[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Review Request 117930: Catch more exceptions in Baloo::FileFetchJob::doStart()
From: "Vishesh Handa" <me () vhanda ! in>
Date: 2014-05-02 8:47:31
Message-ID: 20140502084731.1510.55718 () probe ! kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/117930/#review57099
-----------------------------------------------------------
Ship it!
Looks good! Thanks for taking care of this.
- Vishesh Handa
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
>
>
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/117930/">https://git.reviewboard.kde.org/r/117930/</a>
</td>
</tr>
</table>
<br />
<p>Ship it!</p>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Looks good! Thanks for \
taking care of this.</pre> <br />
<p>- Vishesh Handa</p>
<br />
<p>On May 1st, 2014, 1:14 p.m. UTC, Frank Reininghaus wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for Baloo.</div>
<div>By Frank Reininghaus.</div>
<p style="color: grey;"><i>Updated May 1, 2014, 1:14 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="http://bugs.kde.org/show_bug.cgi?id=333763">333763</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
baloo
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">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.</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Unit tests still pass.</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>src/file/lib/filefetchjob.cpp <span style="color: grey">(21f5520)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/117930/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic