Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

svn_error.h File Reference

Common exception handling for Subversion. More...

#include <apr.h>
#include <apr_errno.h>
#include <apr_pools.h>
#include <apr_want.h>
#include "svn_types.h"
#include "svn_error_codes.h"

Go to the source code of this file.

Defines

#define SVN_NO_ERROR   0
 the best kind of (svn_error_t *) !

#define svn_error_create   (svn_error__locate(__FILE__,__LINE__), (svn_error_create))
 Wrapper macro to collect file and line information.

#define svn_error_createf   (svn_error__locate(__FILE__,__LINE__), (svn_error_createf))
 Wrapper macro to collect file and line information.

#define svn_error_wrap_apr   (svn_error__locate(__FILE__,__LINE__), (svn_error_wrap_apr))
 Wrapper macro to collect file and line information.

#define svn_error_quick_wrap   (svn_error__locate(__FILE__,__LINE__), (svn_error_quick_wrap))
 Wrapper macro to collect file and line information.

#define SVN_ERR(expr)
 A statement macro for checking error return values.

#define SVN_ERR_W(expr, wrap_msg)
 A statement macro, very similar to SVN_ERR.

#define SVN_INT_ERR(expr)
 A statement macro, similar to SVN_ERR, but returns an integer.

#define SVN_ERR_IS_LOCK_ERROR(err)
 Return TRUE if err is an error specifically related to locking a path in the repository, FALSE otherwise.

#define SVN_ERR_IS_UNLOCK_ERROR(err)
 Return TRUE if err is an error specifically related to unlocking a path in the repository, FALSE otherwise.


Functions

void svn_error__locate (const char *file, long line)
 Set the error location for debug mode.

char * svn_strerror (apr_status_t statcode, char *buf, apr_size_t bufsize)
 Put an English description of statcode into buf and return buf, null-terminated, statcode is either an svn error or apr error.

svn_error_tsvn_error_create (apr_status_t apr_err, svn_error_t *child, const char *message)
 Create a nested exception structure.

svn_error_tsvn_error_createf (apr_status_t apr_err, svn_error_t *child, const char *fmt,...)
 Create an error structure with the given apr_err and child, with a printf-style error message produced by passing fmt, using apr_psprintf().

svn_error_tsvn_error_wrap_apr (apr_status_t status, const char *fmt,...)
 Wrap a status from an APR function.

svn_error_tsvn_error_quick_wrap (svn_error_t *child, const char *new_msg)
 A quick n' easy way to create a wrappered exception with your own message, before throwing it up the stack.

void svn_error_compose (svn_error_t *chain, svn_error_t *new_err)
 Add new_err to the end of chain's chain of errors.

svn_error_tsvn_error_dup (svn_error_t *err)
 Create a new error that is a deep copy of err and return it.

void svn_error_clear (svn_error_t *error)
 Free the memory used by error, as well as all ancestors and descendants of error.

void svn_handle_error2 (svn_error_t *error, FILE *stream, svn_boolean_t fatal, const char *prefix)
 Very basic default error handler: print out error stack error to the stdio stream stream, with each error prefixed by prefix, and quit iff the fatal flag is set.

void svn_handle_error (svn_error_t *error, FILE *stream, svn_boolean_t fatal)
 Like svn_handle_error2() but with prefix set to "svn: ".

void svn_handle_warning2 (FILE *stream, svn_error_t *error, const char *prefix)
 Very basic default warning handler: print out the error error to the stdio stream stream, prefixed by prefix.

void svn_handle_warning (FILE *stream, svn_error_t *error)
 Like svn_handle_warning2() but with prefix set to "svn: ".


Detailed Description

Common exception handling for Subversion.

Definition in file svn_error.h.


Define Documentation

#define SVN_ERR_IS_LOCK_ERROR err   
 

Value:

(err->apr_err == SVN_ERR_FS_PATH_ALREADY_LOCKED ||        \
   err->apr_err == SVN_ERR_FS_OUT_OF_DATE)                  \
Return TRUE if err is an error specifically related to locking a path in the repository, FALSE otherwise.

SVN_ERR_FS_OUT_OF_DATE is in here because it's a non-fatal error that can be thrown when attempting to lock an item.

Since:
New in 1.2.

Definition at line 259 of file svn_error.h.

#define SVN_ERR_IS_UNLOCK_ERROR err   
 

Value:

(err->apr_err == SVN_ERR_FS_PATH_NOT_LOCKED ||            \
   err->apr_err == SVN_ERR_FS_BAD_LOCK_TOKEN ||             \
   err->apr_err == SVN_ERR_FS_LOCK_OWNER_MISMATCH ||        \
   err->apr_err == SVN_ERR_FS_NO_SUCH_LOCK ||               \
   err->apr_err == SVN_ERR_RA_NOT_LOCKED ||                 \
   err->apr_err == SVN_ERR_FS_LOCK_EXPIRED)
Return TRUE if err is an error specifically related to unlocking a path in the repository, FALSE otherwise.

Since:
New in 1.2.

Definition at line 269 of file svn_error.h.


Generated on Wed Jun 7 11:02:39 2006 for Subversion by doxygen1.2.18