GME  13
Defines | Typedefs | Functions
svn_error.h File Reference

Common exception handling for Subversion. More...

Go to the source code of this file.

Defines

#define APR_WANT_STDIO
#define SVN_NO_ERROR   0
#define SVN_ERR(expr)
#define svn_error_trace(expr)   (expr)
#define SVN_ERR_W(expr, wrap_msg)
#define SVN_INT_ERR(expr)
#define SVN_ERR_IS_LOCK_ERROR(err)
#define SVN_ERR_IS_UNLOCK_ERROR(err)
#define SVN_ERROR_IN_CATEGORY(apr_err, category)   ((category) == ((apr_err) / SVN_ERR_CATEGORY_SIZE) * SVN_ERR_CATEGORY_SIZE)
#define SVN_ERR_MALFUNCTION()
#define SVN_ERR_MALFUNCTION_NO_RETURN()
#define SVN_ERR_ASSERT_E(expr, err)
#define SVN_ERR_ASSERT(expr)
#define SVN_ERR_ASSERT_NO_RETURN(expr)
#define SVN__NOT_IMPLEMENTED()   return svn_error__malfunction(TRUE, __FILE__, __LINE__, "Not implemented.")

Typedefs

typedef svn_error_t *(* svn_error_malfunction_handler_t )(svn_boolean_t can_return, const char *file, int line, const char *expr)

Functions

char * svn_strerror (apr_status_t statcode, char *buf, apr_size_t bufsize)
const char * svn_error_symbolic_name (apr_status_t statcode)
const char * svn_err_best_message (svn_error_t *err, char *buf, apr_size_t bufsize)
svn_error_tsvn_error_create (apr_status_t apr_err, svn_error_t *child, const char *message)
svn_error_tsvn_error_createf (apr_status_t apr_err, svn_error_t *child, const char *fmt,...) __attribute__((format(printf
svn_error_t svn_error_tsvn_error_wrap_apr (apr_status_t status, const char *fmt,...) __attribute__((format(printf
svn_error_t svn_error_t
svn_error_t
svn_error_quick_wrap (svn_error_t *child, const char *new_msg)
svn_error_tsvn_error_compose_create (svn_error_t *err1, svn_error_t *err2)
void svn_error_compose (svn_error_t *chain, svn_error_t *new_err)
svn_error_tsvn_error_root_cause (svn_error_t *err)
svn_error_tsvn_error_find_cause (svn_error_t *err, apr_status_t apr_err)
svn_error_tsvn_error_dup (svn_error_t *err)
void svn_error_clear (svn_error_t *error)
void svn_handle_error2 (svn_error_t *error, FILE *stream, svn_boolean_t fatal, const char *prefix)
SVN_DEPRECATED void svn_handle_error (svn_error_t *error, FILE *stream, svn_boolean_t fatal)
void svn_handle_warning2 (FILE *stream, svn_error_t *error, const char *prefix)
SVN_DEPRECATED void svn_handle_warning (FILE *stream, svn_error_t *error)
svn_error_tsvn_error_purge_tracing (svn_error_t *err)
svn_error_tsvn_error__malfunction (svn_boolean_t can_return, const char *file, int line, const char *expr)
svn_error_malfunction_handler_t svn_error_set_malfunction_handler (svn_error_malfunction_handler_t func)
svn_error_tsvn_error_raise_on_malfunction (svn_boolean_t can_return, const char *file, int line, const char *expr)
svn_error_tsvn_error_abort_on_malfunction (svn_boolean_t can_return, const char *file, int line, const char *expr)

Detailed Description

Common exception handling for Subversion.

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ====================================================================

Definition in file svn_error.h.


Define Documentation

#define APR_WANT_STDIO

Definition at line 35 of file svn_error.h.

#define SVN_NO_ERROR   0

the best kind of (svn_error_t *) !

Definition at line 54 of file svn_error.h.


Function Documentation

const char* svn_err_best_message ( svn_error_t err,
char *  buf,
apr_size_t  bufsize 
)

If err has a custom error message, return that, otherwise store the generic error string associated with err->apr_err into buf (terminating with NULL) and return buf.

Since:
New in 1.4.
Note:
buf and bufsize are provided in the interface so that this function is thread-safe and yet does no allocation.
const char* svn_error_symbolic_name ( apr_status_t  statcode)

Return the symbolic name of an error code. If the error code is in svn_error_codes.h, return the name of the macro as a string. If the error number is not recognised, return NULL.

An error number may not be recognised because it was defined in a future version of Subversion (e.g., a 1.9.x server may transmit a defined-in-1.9.0 error number to a 1.8.x client).

An error number may be recognised incorrectly if the apr_status_t value originates in another library (such as libserf) which also uses APR. (This is a theoretical concern only: the apr_err member of svn_error_t should never contain a "foreign" apr_status_t value, and in any case Subversion and Serf use non-overlapping subsets of the APR_OS_START_USERERR range.)

Support for error codes returned by APR itself (i.e., not in the APR_OS_START_USERERR range, as defined in apr_errno.h) may be implemented in the future.

Note:
In rare cases, a single numeric code has more than one symbolic name. (For example, SVN_ERR_WC_NOT_DIRECTORY and SVN_ERR_WC_NOT_WORKING_COPY). In those cases, it is not guaranteed which symbolic name is returned.
Since:
New in 1.8.
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.