subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1553266 - in /subversion/trunk/subversion: include/svn_error_codes.h libsvn_subr/error.c
Date Tue, 24 Dec 2013 11:43:55 GMT
Author: rhuijben
Date: Tue Dec 24 11:43:54 2013
New Revision: 1553266

URL: http://svn.apache.org/r1553266
Log:
Give the error message we use for composing multiple error chains a specific
number to allow api users to separate the message chains.

* subversion/include/svn_error_codes.h
  (SVN_ERR_COMPOSED_ERROR): New error code.

* subversion/libsvn_subr/error.c
  (svn_error_compose_create): Wrap using the SVN_ERR_COMPOSED_ERROR error.
  (svn_error_root_cause): Add commented code to explain the problem with
    this function.

Modified:
    subversion/trunk/subversion/include/svn_error_codes.h
    subversion/trunk/subversion/libsvn_subr/error.c

Modified: subversion/trunk/subversion/include/svn_error_codes.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_error_codes.h?rev=1553266&r1=1553265&r2=1553266&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_error_codes.h (original)
+++ subversion/trunk/subversion/include/svn_error_codes.h Tue Dec 24 11:43:54 2013
@@ -1400,6 +1400,11 @@ SVN_ERROR_START
              SVN_ERR_MISC_CATEGORY_START + 41,
              "Packed data stream is corrupt")
 
+  /** @since New in 1.9. */
+  SVN_ERRDEF(SVN_ERR_COMPOSED_ERROR,
+             SVN_ERR_MISC_CATEGORY_START + 42,
+             "Additional errors:")
+
   /* command-line client errors */
 
   SVN_ERRDEF(SVN_ERR_CL_ARG_PARSING_ERROR,

Modified: subversion/trunk/subversion/libsvn_subr/error.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/error.c?rev=1553266&r1=1553265&r2=1553266&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/error.c (original)
+++ subversion/trunk/subversion/libsvn_subr/error.c Tue Dec 24 11:43:54 2013
@@ -261,8 +261,7 @@ svn_error_compose_create(svn_error_t *er
   if (err1 && err2)
     {
       svn_error_compose(err1,
-                        svn_error_quick_wrap(err2,
-                                             _("Additional errors:")));
+                        svn_error_create(SVN_ERR_COMPOSED_ERROR, err2, NULL));
       return err1;
     }
   return err1 ? err1 : err2;
@@ -314,7 +313,10 @@ svn_error_root_cause(svn_error_t *err)
 {
   while (err)
     {
-      if (err->child)
+      /* I don't think we can change the behavior here, but the additional
+         error chain doesn't define the root cause. Perhaps we should rev
+         this function. */
+      if (err->child /*&& err->child->apr_err != SVN_ERR_COMPOSED_ERROR*/)
         err = err->child;
       else
         break;



Mime
View raw message