Example for reference:
try {
    foobar();
} catch (e) {

    console.log(e.lineNumber);
}

Although it's non-standard, Mozilla current implements lineNumber. I
was looking through the source that generates this object and was
considering diving in and adding this myself.
In CommonJS implementations using V8, like node.js (http://
nodejs.org/), it would be really helpful to have direct access to the
line number the exception was raised on. Especially if they are
writing a custom uncaughtException handler. It might be useful in the
browser as well for complex web apps.
I wanted to get everyone's opinion before I spent the time adding
this
feature and it got rejected when submitted. Thoughts? I do realize
the
line number is inside the e.stack, but if they want to display a
custom error message without the stack trace, they're SOL on the line
number.

-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to