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

Re: Can err->message be NULL?

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2005-07-05 22:43:42 CEST

On Tue, 2005-07-05 at 14:25 -0500, kfogel@collab.net wrote:
> Our documentation for 'svn_error_t' does not specify whether the
> message field can ever be NULL. Our code is inconsistent about
> checking for this before using err->message.
>
> Do we want to have a policy? If so, which?

>From the svn_error_create docstring:

 * Notes: Errors are always allocated in a subpool of the global pool,
 * since an error's lifetime is generally not related to the
 * lifetime of any convenient pool. Errors must be freed
 * with @c svn_error_clear(). The specific message should be NULL
 * if there is nothing to add to the general message associated
 * with the error code.

So yes, it can be NULL. Where are we failing to check?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jul 5 23:27:13 2005

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