Currently I'm building a
libcurl bindings for nodejs, mostly for learning purposes, as I'm really new to C++ (like, this is my first time programming something in C++), so you can find it here:
https://github.com/JCMais/node-libcurlIf anyone is willing to take a look at the code and give me any advices I would be really grateful.The main class is here:
https://github.com/JCMais/node-libcurl/blob/develop/src/Curl.ccRight now, I have some major doubts:
If not, how I should throw the exception that is in there and return it?
2. Why the exception stack trace is lost when I throw an exception from inside a function called by the native module?
Ex: Inside the file examples\simple-request.js, if I replace the end event callback with:
throw Error( 'Something went wrong.' );
it shows the following:
.\examples\simple-request.js:599: Uncaught Error: Something went wrong.
Line is incorrect, and there is no stack trace. What is going on?
Thanks in advance.