Re: [nodejs] Acceptable actions to take inside a C++ addon's initialization function?

2012-11-10 Thread Nathan Rajlich
Generally you just set functions and other properties on the provided "target" object (which end up being the native module's exports). Throwing from within an the initialization function, it'd say, is undefined behavior. However, it may be possible to catch those errors and act appropriately, but

[nodejs] Acceptable actions to take inside a C++ addon's initialization function?

2012-11-10 Thread Ryan Cole
I'm getting a seg fault core dump in a simple module. I can eliminate the seg fault if I comment out a ThrowException call in the initialization function. My code: https://gist.github.com/4053133 (line #28) Things makes me wonder, what are the acceptable actions to take inside of this initiali