Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Returning Error from within C++ addon?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ryan Cole  
View profile  
 More options Nov 10 2012, 3:19 pm
From: Ryan Cole <r...@rycole.com>
Date: Sat, 10 Nov 2012 12:19:14 -0800 (PST)
Local: Sat, Nov 10 2012 3:19 pm
Subject: Returning Error from within C++ addon?

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.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fedor Indutny  
View profile  
 More options Nov 10 2012, 3:53 pm
From: Fedor Indutny <fe...@indutny.com>
Date: Sun, 11 Nov 2012 00:52:56 +0400
Local: Sat, Nov 10 2012 3:52 pm
Subject: Re: [nodejs] Returning Error from within C++ addon?

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

Cheers,
Fedor.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ryan Cole  
View profile  
 More options Nov 10 2012, 7:00 pm
From: Ryan Cole <r...@rycole.com>
Date: Sat, 10 Nov 2012 16:00:08 -0800 (PST)
Local: Sat, Nov 10 2012 7:00 pm
Subject: Re: [nodejs] Returning Error from within C++ addon?

Awesome, thanks. I had been looking for that all day, but didn't realize it
was bundled there.

Ryan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »