Use Exception::Error(String::New("Error message")) to create error object.

Cheers,
Fedor.



On Sun, Nov 11, 2012 at 12:19 AM, Ryan Cole <[email protected]> wrote:

> I'm writing an addon in C++ and would like to pass an Error to a callback
> function if an error occurs. I see how to throw exceptions, but in this
> case I simply want to pass an Error. I've looked through v8 docs and node.h
> but don't see any examples of returning an Error. I know this must be
> extremely simple but I'm just not seeing how to do it.
>
> Thanks.
>
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to