I have the following piece of code:
var program = <some code from the user>;
try {
eval(program);
} catch(e) {
alert("Your program has a problem: " + e);
}
I would like to print something more helpful to describe the error,
especially the exact point where it happens. I have examined the SyntaxError
exception object, but I did not find anything useful. The Error Console and
Firebug manage to be more helpful.
Does anyone here know how to do it?
Thanks.
--
Nicolas George
> [ This question is about JavaScript that will run in Firefox. I expect
> it somewhat beyond the scope of this newsgroup, but I did not manage
> to find one more adapted. If you have pointers, they are welcome. ]
comp.lang.javascript should help you.
--
-bts
-Four wheels carry the body; two wheels move the soul