svn commit: r198123 - user/des/svnsup/src/distill
Dag-Erling Smorgrav
des at FreeBSD.org
Thu Oct 15 10:49:24 UTC 2009
Author: des
Date: Thu Oct 15 10:49:24 2009
New Revision: 198123
URL: http://svn.freebsd.org/changeset/base/198123
Log:
Handle libsvnsup errors (poorly)
Modified:
user/des/svnsup/src/distill/distill.h
user/des/svnsup/src/distill/error.c
Modified: user/des/svnsup/src/distill/distill.h
==============================================================================
--- user/des/svnsup/src/distill/distill.h Thu Oct 15 10:48:45 2009 (r198122)
+++ user/des/svnsup/src/distill/distill.h Thu Oct 15 10:49:24 2009 (r198123)
@@ -42,6 +42,8 @@
#include <subversion-1/svn_error.h>
#include <subversion-1/svn_ra.h>
+#include "svnsup.h"
+
extern int debug;
extern int verbose;
@@ -71,6 +73,15 @@ void svnsup_svn_error(svnsup_where_t *,
(error), __VA_ARGS__); \
} while (0)
+/* svnsup errors */
+void svnsup_svnsup_error(svnsup_where_t *, svnsup_err_t, const char *, ...);
+#define SVNSUP_SVNSUP_ERROR(error, ...) \
+ do { \
+ if ((error) != SVNSUP_ERR_NONE) \
+ svnsup_svnsup_error(SVNSUP_WHERE, \
+ (error), __VA_ARGS__); \
+ } while (0)
+
/* assertions */
void svnsup_assert(svnsup_where_t *, const char *, const char *, ...);
#define SVNSUP_ASSERT(cond, ...) \
Modified: user/des/svnsup/src/distill/error.c
==============================================================================
--- user/des/svnsup/src/distill/error.c Thu Oct 15 10:48:45 2009 (r198122)
+++ user/des/svnsup/src/distill/error.c Thu Oct 15 10:49:24 2009 (r198123)
@@ -79,6 +79,22 @@ svnsup_svn_error(svnsup_where_t *where,
}
void
+svnsup_svnsup_error(svnsup_where_t *where, svnsup_err_t error,
+ const char *fmt, ...)
+{
+ va_list ap;
+
+ fprintf(stderr, "svnsup: ");
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+ fprintf(stderr, "\n");
+ fprintf(stderr, "svnsup: error code %d\n", error); /* XXX */
+ svnsup_print_where(stderr, where);
+ exit(1);
+}
+
+void
svnsup_assert(svnsup_where_t *where, const char *cond,
const char *fmt, ...)
{
More information about the svn-src-user
mailing list