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

Re: Learning the Python API - early questions

From: Russell Yanofsky <rey4_at_columbia.edu>
Date: 2003-10-06 20:45:55 CEST

[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.

- Russ

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Oct 6 20:46:06 2003

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

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