2011/5/15 kuno <[email protected]>:
>
>
> On 5月12日, 上午9时42分, Henrik Lindqvist <[email protected]>
> wrote:
>> That should work.
>>
>> On 11 Maj, 06:09, kuno <[email protected]> wrote:
>>
>>
>>
>>
>>
>>
>>
>> > Hi all:
>> >   this is my first post here, :)
>> >   I am developing a c++ addon for nodejs (you guys knew nodejs,
>> > right?). And I have a question, Is that possible to pass an Error
>> > object as a parameter to
>> > a callback funcion? for example
>>
>> > <======================================================
>>
>> > Local<Value> argv[2];
>> > argv[0] = Exception::Error(String::New("Error message"));
>> > argv[1] = String::New("Other parameter"));
>>
>> > callback->Call(Context::GetCurrent()->Global(), 2, argv);
>>
>> > =======================================================>
>>
>> > Is upon code valid within v8, if not, how can I do?
>>
>> > Thanks
>>
>> > --kuno
>
> This seems works, thanks.
> But how to asign Null() or Undefined() value to this array, e.g
> <=========================================================
>
> argv[0] = Null();
> argv[1] = Undefined();
>
> =========================================================>
>
> off course, this will cause error during compilation.
> Is there any way to do so?


Try Handle<Value> argv[2] instead.

> --
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to