[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Verbose error messages for invalid dates

From: <kfogel_at_collab.net>
Date: 2005-07-08 06:05:33 CEST

Christopher Ness <chris@nesser.org> writes:
> As I'm going over my date patch again I'd like to add some more
> verbosity to the error messages for poorly formatted dates used for
> revisions.
>
> The goal is to inform the user that their revision -r{05-01-01} failed
> because it does not meet subversion's date format[s] instead of the
> vague string of:
> Syntax error in revision argument '{0-0-0}'
>
> What is the [best] way to pass an error from svn_opt_parse_revision() up
> to (subversion/clients/cmdline/main.c) main() ?
>
> I think the problem - from my understanding at least - is in
> svn_opt_parse_revision() and parse_one_rev().
>
> In parse_one_rev() any error info that is returned back is whipped out.
>
> err = svn_parse_date (&matched, &tm, str, apr_time_now (), pool);
> if (err)
> {
> svn_error_clear (err);
> return NULL;
> }
>
> How do I break out the information from the lower level to the user?

We don't really have an exception model in Subversion; if we want that
error to reach the user, we have to change the code stack between that
spot and the main(). This could include changing the API of
parse_one_rev(), of course.

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jul 8 06:54:57 2005

This is an archived mail posted to the Subversion Dev mailing list.