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

RE: Detecting unhandled errors

From: Sander Striker <striker_at_apache.org>
Date: 2003-10-13 16:54:19 CEST

> From: Philip Martin [mailto:philip@codematters.co.uk]
> Sent: Monday, October 13, 2003 4:47 PM

[...]
> svn_handle_error doesn't do the right thing
>
> $ svn ls
> ../svn/subversion/libsvn_wc/lock.c:494: (apr_err=155007)
> svn: Path is not a working copy directory
> svn: '.' is not a working copy
> Aborted
>
> I think this is the "feature" that the regression tests don't detect a
> client that aborts. We could do it on Unix but not on Windows, and we
> don't want any tests to rely on platform-specific error detection.

Ah, right!

So, would this do the trick? Is this desired, or should the caller clear
the error itself?

Sander

Log:
Clear handled errors.

* subversion/libsvn_subr/error.c

  (svn_handle_error, svn_handle_warning): Clear error after consumption.

Index: subversion/libsvn_subr/error.c
===================================================================
--- subversion/libsvn_subr/error.c (revision 7398)
+++ subversion/libsvn_subr/error.c (working copy)
@@ -261,6 +261,8 @@
 svn_handle_error (svn_error_t *err, FILE *stream, svn_boolean_t fatal)
 {
   handle_error (err, stream, fatal, 0, APR_SUCCESS);
+
+ svn_error_clear (err);
 }

@@ -270,6 +272,8 @@
   fprintf (stream, "svn: warning: %s\n",
            convert_string_for_output (err->message, err->pool));
   fflush (stream);
+
+ svn_error_clear (err);
 }

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Oct 13 16:55:06 2003

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.