Skip to content

Throw JS / Python exceptions according to execution context #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
GoogleCodeExporter opened this issue Aug 28, 2015 · 20 comments
Closed

Comments

@GoogleCodeExporter
Copy link

Upfront, I know this sounds quite correct, especialy since an uncaught excepton 
will kill an app in python by design, but in JS/Browser/CEF it's a bit 
different, so bare with me...

Here is a trivial example:

We bind this Python function to the browser...
---cut---

def PyFunc(a, b, c):
    return [a, b, c]


--uncut--


And use it like so:

---cut---

var lst = PyFunc(1, 2)


--uncut--

This topples the while app first raising a python exception (logical) and then 
a memory error (possibly related to Issue #2).

Here is the obvious Python error:
'''
TypeError: PyFunc() takes exactly 3 arguments (2 given)
'''

Expected behavior:
- raise a JS exception.

Original issue reported on code.google.com by [email protected] on 28 Aug 2012 at 12:17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants