You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2013/12/26 04:38:35 UTC

svn commit: r1553441 - /subversion/trunk/subversion/mod_dav_svn/util.c

Author: rhuijben
Date: Thu Dec 26 03:38:35 2013
New Revision: 1553441

URL: http://svn.apache.org/r1553441
Log:
* subversion/mod_dav_svn/util.c
  (build_error_chain): Always produce an error message, even when the
    svn_error_t specifies a default message. In general mod_dav doesn't
    transfer the apr status code for us so there is no way to retrieve
    the message on the client by just its value, and the small list of
    http status makes it hard to guess the right cause on the client
    side.

Modified:
    subversion/trunk/subversion/mod_dav_svn/util.c

Modified: subversion/trunk/subversion/mod_dav_svn/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/util.c?rev=1553441&r1=1553440&r2=1553441&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/util.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/util.c Thu Dec 26 03:38:35 2013
@@ -96,9 +96,11 @@ dav_svn__new_error_tag(apr_pool_t *pool,
 static dav_error *
 build_error_chain(apr_pool_t *pool, svn_error_t *err, int status)
 {
-  char *msg = err->message ? apr_pstrdup(pool, err->message) : NULL;
+  char buffer[128];
+  const char *msg = svn_err_best_message(err, buffer, sizeof(buffer));
 
-  dav_error *derr = dav_svn__new_error_tag(pool, status, err->apr_err, msg,
+  dav_error *derr = dav_svn__new_error_tag(pool, status, err->apr_err,
+                                           apr_pstrdup(pool, msg),
                                            SVN_DAV_ERROR_NAMESPACE,
                                            SVN_DAV_ERROR_TAG);