Index: subversion/include/svn_wc.h
===================================================================
--- subversion/include/svn_wc.h	(revision 21617)
+++ subversion/include/svn_wc.h	(working copy)
@@ -1429,7 +1429,29 @@
                                  apr_pool_t *pool);
 
 
-/** A callback vtable invoked by the generic entry-walker function. */
+/** A callback vtable invoked by the generic entry-walker function.
+ * @since New in 1.5.
+ */
+typedef struct
+{
+  /** An @a entry was found at @a path. */
+  svn_error_t *(*found_entry)(const char *path,
+                              const svn_wc_entry_t *entry,
+                              void *walk_baton,
+                              apr_pool_t *pool);
+
+  /** Handle the error @a err encountered while processing @a path.
+   * Wrap or squelch @a err as desired, and return an @c svn_error_t
+   * *, or @c SVN_NO_ERROR.
+   */
+  svn_error_t *(*handle_error)(const char *path,
+                               svn_error_t *err,
+                               void *walk_baton,
+                               apr_pool_t *pool);
+
+} svn_wc_entry_callbacks2_t;
+
+/** @deprecated Provided for backward compatibility with the 1.4 API. */
 typedef struct svn_wc_entry_callbacks_t
 {
   /** An @a entry was found at @a path. */
@@ -1438,11 +1460,8 @@
                               void *walk_baton,
                               apr_pool_t *pool);
 
-  /* ### add more callbacks as new callers need them. */
-
 } svn_wc_entry_callbacks_t;
 
-
 /**
  * A generic entry-walker.
  *
@@ -1468,8 +1487,24 @@
  * distinguished by looking for @c SVN_WC_ENTRY_THIS_DIR in the 'name'
  * field of the entry.
  *
- * @since New in 1.2.
+ * @since New in 1.5.
  */
+svn_error_t *svn_wc_walk_entries3(const char *path,
+                                  svn_wc_adm_access_t *adm_access,
+                                  const svn_wc_entry_callbacks2_t 
+                                  *walk_callbacks,
+                                  void *walk_baton,
+                                  svn_boolean_t show_hidden,
+                                  svn_cancel_func_t cancel_func,
+                                  void *cancel_baton,
+                                  apr_pool_t *pool);
+
+/**
+ * Similar to svn_wc_walk_entries3(), but without cancellation support
+ * or error handling from @a walk_callbacks.
+ *
+ * @deprecated Provided for backward compatibility with the 1.4 API.
+ */
 svn_error_t *svn_wc_walk_entries2(const char *path,
                                   svn_wc_adm_access_t *adm_access,
                                   const svn_wc_entry_callbacks_t 
Index: subversion/libsvn_wc/entries.c
===================================================================
--- subversion/libsvn_wc/entries.c	(revision 21617)
+++ subversion/libsvn_wc/entries.c	(working copy)
@@ -2708,7 +2708,7 @@
 static svn_error_t *
 walker_helper(const char *dirpath,
               svn_wc_adm_access_t *adm_access,
-              const svn_wc_entry_callbacks_t *walk_callbacks,
+              const svn_wc_entry_callbacks2_t *walk_callbacks,
               void *walk_baton,
               svn_boolean_t show_hidden,
               svn_cancel_func_t cancel_func,
@@ -2720,17 +2720,24 @@
   apr_hash_index_t *hi;
   svn_wc_entry_t *dot_entry;
 
-  SVN_ERR(svn_wc_entries_read(&entries, adm_access, show_hidden, pool));
+  SVN_ERR(walk_callbacks->handle_error
+          (dirpath, svn_wc_entries_read(&entries, adm_access, show_hidden,
+                                        pool), walk_baton, pool));
   
   /* As promised, always return the '.' entry first. */
   dot_entry = apr_hash_get(entries, SVN_WC_ENTRY_THIS_DIR, 
                            APR_HASH_KEY_STRING);
   if (! dot_entry)
-    return svn_error_createf(SVN_ERR_ENTRY_NOT_FOUND, NULL,
-                             _("Directory '%s' has no THIS_DIR entry"),
-                             svn_path_local_style(dirpath, pool));
+    return walk_callbacks->handle_error
+      (dirpath, svn_error_createf(SVN_ERR_ENTRY_NOT_FOUND, NULL,
+                                  _("Directory '%s' has no THIS_DIR entry"),
+                                  svn_path_local_style(dirpath, pool)),
+       walk_baton, pool);
 
-  SVN_ERR(walk_callbacks->found_entry(dirpath, dot_entry, walk_baton, pool));
+  SVN_ERR(walk_callbacks->handle_error
+          (dirpath,
+           walk_callbacks->found_entry(dirpath, dot_entry, walk_baton, pool),
+           walk_baton, pool));
 
   /* Loop over each of the other entries. */
   for (hi = apr_hash_first(pool, entries); hi; hi = apr_hash_next(hi))
@@ -2752,18 +2759,25 @@
         continue;
 
       entrypath = svn_path_join(dirpath, key, subpool);
-      SVN_ERR(walk_callbacks->found_entry(entrypath, current_entry,
-                                          walk_baton, subpool));
+      SVN_ERR(walk_callbacks->handle_error
+              (entrypath, walk_callbacks->found_entry(entrypath, current_entry,
+                                                      walk_baton, subpool),
+               walk_baton, pool));
 
       if (current_entry->kind == svn_node_dir)
         {
           svn_wc_adm_access_t *entry_access;
-          SVN_ERR(svn_wc_adm_retrieve(&entry_access, adm_access, entrypath,
-                                      subpool));
-          SVN_ERR(walker_helper(entrypath, entry_access,
-                                walk_callbacks, walk_baton,
-                                show_hidden, cancel_func, cancel_baton,
-                                subpool));
+          SVN_ERR(walk_callbacks->handle_error
+                  (entrypath,
+                   svn_wc_adm_retrieve(&entry_access, adm_access, entrypath,
+                                       subpool),
+                   walk_baton, pool));
+
+          if (entry_access)
+            SVN_ERR(walker_helper(entrypath, entry_access,
+                                  walk_callbacks, walk_baton,
+                                  show_hidden, cancel_func, cancel_baton,
+                                  subpool));
         }
 
       svn_pool_clear(subpool);
@@ -2774,7 +2788,6 @@
 }
 
 
-/* The public function */
 svn_error_t *
 svn_wc_walk_entries(const char *path,
                     svn_wc_adm_access_t *adm_access,
@@ -2788,6 +2801,15 @@
                               pool);
 }
 
+static svn_error_t *
+walker_default_error_handler(const char *path,
+                             svn_error_t *err,
+                             void *walk_baton,
+                             apr_pool_t *pool)
+{
+  return err;
+}
+
 svn_error_t *
 svn_wc_walk_entries2(const char *path,
                      svn_wc_adm_access_t *adm_access,
@@ -2798,26 +2820,49 @@
                      void *cancel_baton,
                      apr_pool_t *pool)
 {
+  svn_wc_entry_callbacks2_t walk_cb2 = { walk_callbacks->found_entry,
+                                         walker_default_error_handler };
+  return svn_wc_walk_entries3(path, adm_access, &walk_cb2, walk_baton,
+                              show_hidden, cancel_func, cancel_baton, pool);
+}
+
+/* The public API. */
+svn_error_t *
+svn_wc_walk_entries3(const char *path,
+                     svn_wc_adm_access_t *adm_access,
+                     const svn_wc_entry_callbacks2_t *walk_callbacks,
+                     void *walk_baton,
+                     svn_boolean_t show_hidden,
+                     svn_cancel_func_t cancel_func,
+                     void *cancel_baton,
+                     apr_pool_t *pool)
+{
   const svn_wc_entry_t *entry;
   
   SVN_ERR(svn_wc_entry(&entry, path, adm_access, show_hidden, pool));
 
   if (! entry)
-    return svn_error_createf(SVN_ERR_UNVERSIONED_RESOURCE, NULL,
-                             _("'%s' is not under version control"),
-                             svn_path_local_style(path, pool));
+    return walk_callbacks->handle_error
+      (path, svn_error_createf(SVN_ERR_UNVERSIONED_RESOURCE, NULL,
+                               _("'%s' is not under version control"),
+                               svn_path_local_style(path, pool)),
+       walk_baton, pool);
 
   if (entry->kind == svn_node_file)
-    return walk_callbacks->found_entry(path, entry, walk_baton, pool);
+    return walk_callbacks->handle_error
+      (path, walk_callbacks->found_entry(path, entry, walk_baton, pool),
+       walk_baton, pool);
 
   else if (entry->kind == svn_node_dir)
     return walker_helper(path, adm_access, walk_callbacks, walk_baton,
                          show_hidden, cancel_func, cancel_baton, pool);
 
   else
-    return svn_error_createf(SVN_ERR_NODE_UNKNOWN_KIND, NULL,
-                             _("'%s' has an unrecognized node kind"),
-                             svn_path_local_style(path, pool));
+    return walk_callbacks->handle_error
+      (path, svn_error_createf(SVN_ERR_NODE_UNKNOWN_KIND, NULL,
+                               _("'%s' has an unrecognized node kind"),
+                               svn_path_local_style(path, pool)),
+       walk_baton, pool);
 }
 
 

