At 06-10-2003 19:45, Russell Yanofsky wrote:
>[The bottom part of my previous post somehow got cut off. Here it is.]
>
>Barry Scott wrote:
> > At the moment an error in the python code will drop me into
> > Dev Studio to debug the exception. It would be nice for the
> > wrappers to raise python exceptions rather then enter the svn
> > code and hit the assert calls or fall off the end of NULL
> > pointers.
>
>This is an issue I'm not really sure how to deal with. When you misuse an
>API in C, it's expected that you will get failed assertions and null pointer
>deferences. But python users expect exceptions to explain the error
>conditions, and except when it comes to type checking, swig doesn't provide
>this. It is possible to manually add checks, for example we could easily
>raise a python exception when the "ctx" argument passed to svn_client_ls()
>has a NULL "auth_baton" member. But we can't manually check for every error
>condition.
Is could be fixed in the C API or the Python wrapper. If the C API converted
misuse to error codes then the python would just throw python exceptions with
ease.
Again the RapidSVN api may make this a lot easier. I'm watching for the patch
to bring RapidSVN up to 0.30.0 compatibility.
Barry
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Oct 7 23:59:06 2003