Make some "mandatory" assertions more useful for debugging.
* subversion/libsvn_subr/dirent_uri.c
(svn_uri_canonicalize,
svn_relpath_canonicalize,
svn_dirent_canonicalize): Make the assertion messages more descriptive.
@@ -1659,8 +1659,11 @@ svn_uri_canonicalize(const char *uri, apr_pool_t *pool)
{
const char *result;
svn_error_t *const err = canonicalize(&result, type_uri, uri, pool);
+ if (err)
+ {
svn_error_clear(err);
- SVN_ERR_ASSERT_NO_RETURN(!err);
+ SVN_ERR_ASSERT_NO_RETURN(!"URI canonicalization failed");
+ }
return result;
}
@@ -1693,8 +1696,11 @@ svn_relpath_canonicalize(const char *relpath, apr_pool_t *pool)
{
const char *result;
svn_error_t *const err = canonicalize(&result, type_relpath, relpath, pool);
+ if (err)
+ {
svn_error_clear(err);
- SVN_ERR_ASSERT_NO_RETURN(!err);
+ SVN_ERR_ASSERT_NO_RETURN(!"relpath canonicalization failed");
+ }
return result;
}
@@ -1758,8 +1764,11 @@ svn_dirent_canonicalize(const char *dirent, apr_pool_t *pool)
{
const char *result;
svn_error_t *const err = canonicalize_dirent(&result, dirent, pool);
+ if (err)
+ {
svn_error_clear(err);
- SVN_ERR_ASSERT_NO_RETURN(!err);
+ SVN_ERR_ASSERT_NO_RETURN(!"dirent canonicalization failed");
+ }
return result;
}
