开发者

Exception line-number in Jscript-ASP

I'm developing a website with server-side JScript engine over ASP server.

I h开发者_如何学运维ave several try-catch clauses in my code looking roughly like this:

try {
   // do something
}
catch (err) {
   // pass it to the frontend code
   die("Exception caught: " + err.description);
}

I would very much like to display the line number in which the error occurred. The filename would be a nice bonus but it's not very important. How can it be done?

Thanks!


The err object (of type ASPError) has Line and File properties - just what you need (see this for more properties).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜