[Gdal-dev] SWIG Exceptions for C# Bindings

Ari Jolma ari.jolma at tkk.fi
Sun Mar 18 05:34:29 EDT 2007


Howard Butler wrote:
> On Mar 17, 2007, at 3:18 AM, Ari Jolma wrote:
>> Could we adopt the policy of always throwing an exception in a case 
>> of errors in the bindings?
>
> I think we should always throw for every language except Python.  If 
> we can special case Python to no do so by default with some defines, 
> that would be great. Python unfortunately has a lot of legacy, so 
> having exceptions on by default will cause a lot of trouble for 
> existing code.  When we were developing the ng bindings, Python was 
> the only fleshed out binding, so having them off by default made 
> sense, but now that all of the other languages have come together, 
> Python's special case is causing trouble for the rest.

I'm not proposing any changes into the current state of thing. I'd just 
want us to be consistent with having an error status set in a case of an 
error (any error), so that the system we have in place (%exception in 
cpl_exceptions.i) can catch error situations. I don't know Python's 
system enough to know what you are talking about, sorry :)

Cheers,

Ari

>
> Howard




More information about the Gdal-dev mailing list