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

Re: svn commit: r35023 - trunk/subversion/libsvn_fs_fs

From: Stefan Sperling <stsp_at_elego.de>
Date: Mon, 5 Jan 2009 13:20:08 +0100

On Sun, Jan 04, 2009 at 04:52:33PM -0800, Blair Zajac wrote:
> Stefan Sperling wrote:
> > On Mon, Jan 05, 2009 at 12:08:19AM +0100, Stefan Sperling wrote:
> >> >From subversion/include/svn_error.h:
> >
> > Er, I quoted the wrong macro, sorry.
> >
> > This is the one:
> >
> > /** Similar to SVN_ERR_ASSERT(), but without the option of returning
> > * an error to the calling function.
> > *
> > * If possible you should use SVN_ERR_ASSERT() instead.
> > *
> > * @since New in 1.6.
> > */
> > #define SVN_ERR_ASSERT_NO_RETURN(expr) \
> > do { \
> > if (!(expr)) { \
> > svn_error__malfunction(FALSE, __FILE__, __LINE__, #expr); \
> > abort(); \
> > } \
> > } while (0)
>
> It's still better to switch to a function that returns an svn_error_t *. This
> macro is nice, but it can cause an abort in library code, which we've been
> moving away from.

I think the idea is that users should be registering their own malfunction
handler which gracefully terminates the app if they don't want the abort.

Stefan

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1005067
Received on 2009-01-05 13:20:46 CET

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