swig icon indicating copy to clipboard operation
swig copied to clipboard

JavaScriptCore: exception/error handling is missing necessary stuff

Open ewmailing opened this issue 10 years ago • 0 comments

When an error occurs in the SWIG wrapper functions, it creates a string which is used as the exception. This is insufficient for being able to get the file name and line number to track down the error in your JavaScript code.

Additionally, JSCore expects an actual JSValueRef to be returned and not NULL, even on the error case.

In my JSBugs2 branch at https://github.com/ewmailing/swig, I have fixes for this.

The commit logs contain a lot more information. I will submit a pull request shortly.

https://github.com/ewmailing/swig/commit/be938aa6cf22414bf18221d0d027b4801076e01 https://github.com/ewmailing/swig/commit/8b3bd4f0e22ed1bdd097769779607fa04e776005

ewmailing avatar May 20 '14 00:05 ewmailing