[redland-dev] Patch: Log handler uses wrong user_data

Edd Dumbill edd at usefulinc.com
Thu Jul 8 22:04:36 BST 2004


On Thu, 2004-07-08 at 22:57 +0200, René Puls wrote:
> On Thu, 08 Jul 2004 21:37:18 +0100, Edd Dumbill <edd at usefulinc.com> wrote:
> > On Thu, 2004-07-08 at 22:20 +0200, René Puls wrote:
> > > I also have a question regarding this log handler... If I'm using
> > > Redland from a language like Objective-C, is it safe to throw an
> > > exception inside the handler? This would interrupt normal execution,
> > > so any Redland-internal code that follows the librdf_log_simple() call
> > > would never be reached.
> > 
> > I was just talking about this with Dave now, as I'm studying how to get
> > error reporting into the C# API.  The basic answer is "no".  You simply
> > have to store up the exceptions you get and then process them at the end
> > of the call to the Redland function.
> 
> Thanks Edd--I'll do that, although it makes me wonder how I should
> handle multiple calls to the log handler... I can only throw one
> exception after all. :-)

There are two choices: only throw the first error, or throw an exception
which includes all the errors.  I think I'm opting for the latter.

-- Edd





More information about the redland-dev mailing list