You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Jim Blandy <ji...@savonarola.red-bean.com> on 2000/08/22 22:43:30 UTC
Generating messages for APR_OS_START_USERR-range codes
If I understand things correctly, error values in the range
APR_OS_START_USEERR to APR_OS_START_USEERR + 499 are available for use
by the application using APR.
What's the appropriate way to provide messages for those error codes?
Is there any way to make apr_strerror return something helpful for a
user-defined error code? Or is the user's error-handling code
supposed to check for its own error values before calling
apr_strerror?
Re: Generating messages for APR_OS_START_USERR-range codes
Posted by Ben Collins-Sussman <su...@newton.collab.net>.
Jim Blandy <ji...@savonarola.red-bean.com> writes:
> If I understand things correctly, error values in the range
> APR_OS_START_USEERR to APR_OS_START_USEERR + 499 are available for use
> by the application using APR.
>
Yes.
> What's the appropriate way to provide messages for those error codes?
> Is there any way to make apr_strerror return something helpful for a
> user-defined error code? Or is the user's error-handling code
> supposed to check for its own error values before calling
> apr_strerror?
Funny you should mention that... Karl and I were *just* talking about
this issue today. Notice that we just changed svn_handle_error() so
that it would bother to differentiate between a general APR error
vs. a SVN-specific error. But the APR-error section has its own
apr_strerror() routine. Perhaps we should imitate with our own
svn_strerror()... just look up the svn errorcode in a static array of
strings.