At 09:34 PM 4/28/2007 -0600, Joseph Galbraith wrote:
>A better alternative, in my opinion, would be to establish a
>subversion function, something like:
>
>typedef void (*PFN_abort)();
>void svn_set_abort_function(PFN_abort pfnAbort);
>
>The abort function would default to the standard abort, but
>TSVN could call and set the abort function to a function that
>throws an exception caught back at the original call site
>in TSVN.
Aha. I guess our e-mails crossed tracks :-) Actual structured error
handling would work, but setjmp/longjmp is more general and can be used by
C clients.
>The only problem with this is that we'll leak any resources
>allocated by TSVN during the function that triggered the abort,
>but I don't see a good way around that...
Don't APR pools take care of this automatically? I mean, the garbage might
not be collected immediately, but it will eventually get cleaned out, as
long as the exception handler/longjmp target doesn't bypass the cleanup
that is mandatory when integrating with a long-running process.
Jonathan Gilbert
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Apr 29 05:59:17 2007