// This file has been modified from the original to include a reference to /Users/malcolm/Projects/outergit/asana
var Config = {};
exports.Config = Config;
// put default .js and .so files here
// NOTE: this was called "Config.libraryPath" in older versions of v8cgi
require.paths.push("/Users/malcolm/Projects/outergit/asana/3rdparty/v8js/v8cgi/lib");
// these will get loaded automatically
Config["libraryAutoload"] = ["js", "util", "html", "http"];
// name of session cookie
Config["sessionCookie"] = "V8SID";
// directory for session storage
Config["sessionPath"] = "/tmp";
// session lifetime - in seconds
Config["sessionTime"] = 60*60;
// session domain
Config["sessionDomain"] = "/";
// address for sending emails
Config["smtpHost"] = "127.0.0.1";
// port for sending emails
Config["smtpPort"] = 25;
// default From: header
Config["smtpFrom"] = "";
// explicit HTTP request handler. Will get obsoleted in future versions.
Config["httpHandler"] = null;
// Uncaught exceptions go to stdout (true) or stderr (false)
Config["showErrors"] = true;
I'm sorry about the mention to a.js in the earlier email. I hope that everything in this message makes sense.
Hi Ondrej,Thanks for taking the time to help us better understand this. I did the same experiment with node.js and found that they do show a stack starting from "test.js" with the proper line numbers.When node.js is processing a require it uses the v8::Script::Compile method to acquire a v8::Script object and then checks a TryCatch instance for any errors and reports them. If that goes well, then it will call script->Run().In v8cgi, it looks like you are using v8::Script::new and not checking any TryCatch to see if exceptions were caught.I thought this observation might be related but I have VERY limited knowledge of the v8 source so I apologize if this isn't helpful.Thanks,Kris
Hi Ondrej,Thanks for taking the time to help us better understand this. I did the same experiment with node.js and found that they do show a stack starting from "test.js" with the proper line numbers.When node.js is processing a require it uses the v8::Script::Compile method to acquire a v8::Script object and then checks a TryCatch instance for any errors and reports them. If that goes well, then it will call script->Run().In v8cgi, it looks like you are using v8::Script::new and not checking any TryCatch to see if exceptions were caught.I thought this observation might be related but I have VERY limited knowledge of the v8 source so I apologize if this isn't helpful.Thanks,Kris
Hi Ondrej,Thanks for taking the time to help us better understand this. I did the same experiment with node.js and found that they do show a stack starting from "test.js" with the proper line numbers.When node.js is processing a require it uses the v8::Script::Compile method to acquire a v8::Script object and then checks a TryCatch instance for any errors and reports them. If that goes well, then it will call script->Run().In v8cgi, it looks like you are using v8::Script::new and not checking any TryCatch to see if exceptions were caught.I thought this observation might be related but I have VERY limited knowledge of the v8 source so I apologize if this isn't helpful.Thanks,Kris
That's great news Ondřej! We will try this out when we get back in the office and confirm that the exception handling improvements work as expected. Thank you for resolving this so quickly.
Best,