From: Sebastian Spaeth <Sebastian@SSpaeth.de>
To: Patrick Totzke <patricktotzke@googlemail.com>,
David Bremner <david@tethera.net>
Cc: Patrick Totzke <patricktotzke@googlemail.com>, notmuch@notmuchmail.org
Subject: Re: xapian exceptions not caught in python bindings?
Date: Tue, 09 Aug 2011 17:00:58 +0200 [thread overview]
Message-ID: <87mxfipr2t.fsf@SSpaeth.de> (raw)
In-Reply-To: <20110723133602.GA30241@brick.lan>
[-- Attachment #1: Type: text/plain, Size: 1157 bytes --]
On Sat, 23 Jul 2011 14:36:02 +0100, Patrick Totzke wrote:
> I hope the patch I send is correctly formated, I'm still fumbling with
> git send-email and the --in-reply-to option.
> Anyhow, forgive my language, of course I didn't mean to be condescending in any
> way by calling these prints garbage! It's just that it's highly unusual and very
> 'non-pythonic' that a module directly prints to stderr instead of raising exceptions
> and if you work directly with a curseslike interface on a terminal these
> errormessages litter my screen.
Hi,
1) I fixed the lack of throwing a NotmuchError when search_threads()
failed. This was a bug.
2) Taking over stderr and capturing it in a temporary file whenever we
create a query sounds incredibly hackish to me. It also potentially has
side-effects that I cannot even judge (we might be using stderr for
something completely different).
IMHO, libnotmuch should be modified to not directly print to stderr
but to provide a string with a detailed error message together with it's
status value. This would be the proper way to deal with it, even if it
means a bit more complexity in the notmuch binary.
Sebastian
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
prev parent reply other threads:[~2011-08-09 15:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-26 20:27 xapian exceptions not caught in python bindings? Patrick Totzke
2011-07-17 19:35 ` Patrick Totzke
2011-07-17 19:51 ` David Bremner
2011-07-23 13:12 ` [PATCH] interpret Xapian errors from sdterr as exceptions pazz
2011-07-23 13:36 ` xapian exceptions not caught in python bindings? Patrick Totzke
2011-08-09 15:00 ` Sebastian Spaeth [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mxfipr2t.fsf@SSpaeth.de \
--to=sebastian@sspaeth.de \
--cc=david@tethera.net \
--cc=notmuch@notmuchmail.org \
--cc=patricktotzke@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).