In JavaScript I have a var str = ".a long string that contains many lines..."
In case of exception that caused by eval(str);
I had like to catch it and print the the line number that caused the exception. (the line internal to str..)
Is it possible?
EDIT As part of the Alligator project (http://github.com/mrohad/Alligator), an application server for JavaScript, I am reading files from the disk and eval() anything that is nested to a scriplet( < ? ? > )
I am running this script outside a browser, using NodeJS (on top of V8).