On 12/22/10 5:47 AM, Daniel Shahaf wrote:
bl...@apache.org wrote on Wed, Dec 22, 2010 at 05:46:45 -0000:
Author: blair
Date: Wed Dec 22 05:46:45 2010
New Revision: 1051763

URL: http://svn.apache.org/viewvc?rev=1051763&view=rev
Log:
Add a private function that takes the error returned from
svn_repos_fs_commit_txn() and builds a error message string containing
either or both of the svn_fs_commit_txn() error and the
SVN_ERR_REPOS_POST_COMMIT_HOOK_FAILED wrapped post-commit error.  The
function skips over tracing errors.

+                              "post-commit hook had error '%s'.",
+                              err->message ? err->message
+                                           : "(no error message)",
+                              hook_err2->message ? hook_err2->message
+                                                 : "(no error message)");
+        }
+    }
+  else
+    {
+      if (err->message)
+        return apr_pstrdup(pool, err->message);

In this case, and in the apr_pstrdup() above, might it be useful to say
explicitly whether the given error is from the post-commit hook or from
some FS post-commit fiddling?  You've skipped over the
SVN_ERR_REPOS_POST_COMMIT_HOOK_FAILED link, so the "post-commit hook
failed" message that used to be there would be gone.

Turns out we don't need to say that because the wrapped error message is already pretty self-describing.

Further fixed in r1052029.

Blair

Reply via email to