marylinh / pyv8

Automatically exported from code.google.com/p/pyv8
0 stars 0 forks source link

Fatal error on object creation with incorrect number of parameters. #65

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

import PyV8 
class Test2(PyV8.JSClass): 
    def __init__(self, param): 
        self.param = param 
class Global(PyV8.JSClass): 
    def __init__(self): 
        self.Test2 = Test2 
with PyV8.JSContext(Global()) as ctx: 
    ctx.eval(""" 
        x = new Test2(); 
    """) 
This is giving me: 
terminate called after throwing an instance of 
'boost::python::error_already_set' 
Aborted 
And terminating the entire process. 

What is the expected output? What do you see instead?

Looks like it should send JavaScript undefined, which translates to 
Python None?? (I'm not sure) to each of the params instead but I am 
not sure how doable that is.  I think just a exception would be fine 
here, but the boost error that terminates the process is killer. 

What version of the product are you using? On what operating system?

Please provide any additional information below.

http://groups.google.com/group/pyv8/browse_thread/thread/8dfacdc384654c80?hl=en

Original issue reported on code.google.com by flier...@gmail.com on 18 Dec 2010 at 3:29

GoogleCodeExporter commented 9 years ago
Please verify the issue with SVN trunk after r315

Original comment by flier...@gmail.com on 18 Dec 2010 at 3:31