[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r37336 - trunk/subversion/libsvn_subr

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: Fri, 17 Apr 2009 13:55:33 -0500

I dunno. I'd prefer a nice stack trace, rather than having to get the
core file, fire up the debugger, etc. Hopefully anybody that's
catching the error is also checking the error code to make sure they
propagate unexpected errors back up the stack. (And if you aren't:
shame on you, you get what you asked for.)

-Hyrum

On Apr 17, 2009, at 1:51 PM, Greg Stein wrote:

> Euh... this isn't gonna work. Somebody might catch the error. I'd
> prefer a core dump over a caught-and-cleared error.
>
> On Fri, Apr 17, 2009 at 20:33, Hyrum K. Wright
> <hyrum_at_hyrumwright.org> wrote:
>> Author: hwright
>> Date: Fri Apr 17 11:33:41 2009
>> New Revision: 37336
>>
>> Log:
>> If we've enabled stack tracing, use it when we encounter an abort().
>>
>> * subversion/libsvn_subr/error.c
>> (svn_error_abort_on_malfunction): If tracing is enabled, wrap and
>> return the error, so we can get a stack trace of the abort
>> failure.
>>
>> Modified:
>> trunk/subversion/libsvn_subr/error.c
>>
>> Modified: trunk/subversion/libsvn_subr/error.c
>> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_subr/error.c?pathrev=37336&r1=37335&r2=37336
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- trunk/subversion/libsvn_subr/error.c Fri Apr 17 11:31:36
>> 2009 (r37335)
>> +++ trunk/subversion/libsvn_subr/error.c Fri Apr 17 11:33:41
>> 2009 (r37336)
>> @@ -541,11 +541,16 @@ svn_error_abort_on_malfunction(svn_boole
>> const char *file, int line,
>> const char *expr)
>> {
>> +#ifndef SVN_ERR__TRACING
>> svn_error_t *err = svn_error_raise_on_malfunction(TRUE, file,
>> line, expr);
>>
>> svn_handle_error2(err, stderr, FALSE, "svn: ");
>> abort();
>> return err; /* Not reached. */
>> +#else
>> + return svn_error_return(svn_error_raise_on_malfunction(TRUE, file,
>> + line,
>> expr));
>> +#endif
>> }
>>
>> /* The current handler for reporting malfunctions, and its default
>> setting. */
>>
>> ------------------------------------------------------
>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=1772419
>>
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1772710

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1772749
Received on 2009-04-17 20:55:53 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.