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

Re: don't use assert()

From: Kouhei Sutou <kou_at_cozmixng.org>
Date: Fri, 16 May 2008 20:19:29 +0900

Hi,

2008/4/7 C. Michael Pilato <cmpilato_at_collab.net>:
> Kouhei Sutou wrote:
>>
>> It seems that svn_path_is_url(merge_source_url) is failed
>> easily by user input... And a program will be crashed and a
>> user will see like the following message that is not useful
>> for him:
>>
>> subversion/libsvn_client/mergeinfo.c:1144:
>> svn_client_mergeinfo_log_merged: Assertion
>> `svn_path_is_url(merge_source_url)' failed.
>
> Right, sure. So the correct thing to do (as I'm getting rather tired of
> *assert*ing) is for the command-line client to check the input and print the
> nicey nicey error message, leaving the libraries to assert whatever they
> wish to assert.

In the Ruby bindings, if the Subversion library calls abort() and
crashes our program, we can't get a backtrace. It's too
inconvenient to debug our code. We can't get any information
where the problem code. We can only get a file and line in the
Subversion library.

If the Subversion library uses svn_error_t not abort(), we can
get a backtrace for our Ruby codes. It's very helpful to debug
our Ruby codes.

Thanks,

--
kou
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-05-16 13:19:44 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.