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

[PATCH] svn_error_quick_wrap shouldn't hide old file/line information...

From: Jay Freeman \(saurik\) <saurik_at_saurik.com>
Date: 2002-02-14 10:11:01 CET

While using Branko's (much better, really nifty) version of my (rather
hacked together) file/line error patch, I noticed some behavior that
gets kind of annoying when you are trying to find where an error is
coming from. I would have replied to the 1267 commit, but I'm not on
the commit list yet. Whenever svn_error_quick_wrap() is used (a
function I don't really understand the mystic purpose of yet), it loses
information. An example is in merge_commit_errors(), that could be
called from many places, and is passed in two errors. It then decides
to quick wrap one of the two errors. This patch makes it so that you
get where the error actually occurred rather than the location where the
message got changed to something less helpful.

*re-runs that test now*

Ah HA!!! So that error is really coming from log.c (like all the
others). That makes this a lot easier :).

Jay Freeman (saurik)

* subversion/include/svn_error.h: Removed extra #define for

* subversion/libsvn_subr/svn_error.c: Removed extra #undef for
svn_error_quick_wrap and altered svn_error_quick_wrap to call
svn_error__locate() for the child's file and line.

Index: .\subversion\include\svn_error.h
--- .\subversion\include\svn_error.h
+++ .\subversion\include\svn_error.h Thu Feb 14 02:55:17 2002
@@ -104,11 +104,6 @@
    child's fields.) */
 svn_error_t *svn_error_quick_wrap (svn_error_t *child, const char

-#ifdef SVN_DEBUG
-#define svn_error_quick_wrap \
- (svn_error__locate(__FILE__,__LINE__), (svn_error_quick_wrap))
 /* Add NEW to the end of CHAIN's chain of errors; i.e., NEW will be
    the last child error in CHAIN. */
 void svn_error_compose (svn_error_t *chain, svn_error_t *new_err);
Index: .\subversion\libsvn_subr\svn_error.c
--- .\subversion\libsvn_subr\svn_error.c
+++ .\subversion\libsvn_subr\svn_error.c Thu Feb 14 02:56:37 2002
@@ -48,7 +48,6 @@
 #ifdef SVN_DEBUG
 #undef svn_error_create
 #undef svn_error_createf
-#undef svn_error_quick_wrap

@@ -292,6 +291,7 @@
 svn_error_t *
 svn_error_quick_wrap (svn_error_t *child, const char *new_msg)
+ svn_error__locate(child->file, child->line);
   return svn_error_create (child->apr_err,

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:37:07 2006

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.