[cffi-devel] CFFI foreign library error pathname patch

Zach Beane xach at xach.com
Sun Dec 18 12:17:43 UTC 2011


Luís Oliveira <luismbo at gmail.com> writes:

> On Sun, Dec 18, 2011 at 4:13 AM, Stelian Ionescu <sionescu at cddr.org> wrote:
>> Xach requested better error reporting from load-foreign-library, so
>> please review this patch
>
> So now we consistently get a load-foreign-library-error instead of
> getting a simple-error for some of the errors. Storing the pathname in
> the error seems like a good idea too. Is there a specific use-case
> that motivated that change? I'm asking because it's not populated
> correctly in the try-foreign-library-alternatives case, and it's not
> clear what should go there in that case. Perhaps we should store
> something else? (The foreign-library object perhaps?)

The use-case I had in mind was an environment that caught the error and
offered a useful action, e.g. "install the library via
apt/homebrew/macports/etc and continue".

Zach




More information about the cffi-devel mailing list