TimWhiting / dartpy

An experiment in embedding Python in Dart via dart ffi and the Python c-api
68 stars 10 forks source link

pyerr_fetch #11

Open vmtest888 opened 4 months ago

vmtest888 commented 4 months ago

When an error occurs, use pyerr_ Fetch obtains information and then throws an exception through Dart to make the error more clear

TimWhiting commented 4 months ago

You are welcome to create a pull request, seems like you know what to do.

vmtest888 commented 4 months ago

Another suggestion is that different systems have different ABIs. For example, the wchar in py_setpath is int32 on macos and int16 on windows. We hope to automatically match and convert it from the string type in dart to the corresponding platform type·