Re: [nodejs] Returning Error from within C++ addon?

2012-11-10 Thread Ryan Cole
Awesome, thanks. I had been looking for that all day, but didn't realize it was bundled there. Ryan On Saturday, November 10, 2012 2:53:34 PM UTC-6, Fedor Indutny wrote: > > Use Exception::Error(String::New("Error message")) to create error object. > > Cheers, > Fedor. > > > > On Sun, Nov 11, 20

Re: [nodejs] Returning Error from within C++ addon?

2012-11-10 Thread Fedor Indutny
Use Exception::Error(String::New("Error message")) to create error object. Cheers, Fedor. On Sun, Nov 11, 2012 at 12:19 AM, Ryan Cole 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 >

[nodejs] Returning Error from within C++ addon?

2012-11-10 Thread Ryan Cole
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 ext