Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 29th, 2004, 06:09 PM
Registered User
 
Join Date: Sep 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default returning error line

Hi

I am creating some error trapping code that will email me when a error occurs in asp code. Alot of

the code works, except perhaps one of the most vital pieces of information line number of the error

I have tried

ASPError.Line

&

set objErr=Server.GetLastError()
objErr.Line

&

Err.Line

I get nothing returned or the object im looking at, or it is errorous. Im using IIS 6. Does anyone

have any ideas of how to get the line number of an error? You would think it would be a important

thing to be able to return and simple too.

Thanks in advance for any help
Rob

 
Old September 30th, 2004, 08:56 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

You can check for ERR.LINE as it is not a property of ERR object.

Try this.
Err.Description

You should be able to get through.
Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old September 30th, 2004, 09:06 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Rob,

You can do this by creating a custom error page for 500;100 errors & set IIS to point to it when it raises a 500;100 instead of showing the default message.

At this stage an ASPError object (that has a Line property) is available from the Server.GetLastError method.

The following article may be of use...
http://www.microsoft.com/windows2000...p/vbob1dtg.htm

HTH,

Chris






Similar Threads
Thread Thread Starter Forum Replies Last Post
Error Reporting With Line Numbers ef1196 Pro Visual Basic 2005 10 December 12th, 2006 03:28 PM
Error: Line 8: Incorrect syntax near '.' ; Help! Fly4High SQL Server 2000 2 August 15th, 2006 03:02 AM
All Array is not returning [Coding Error] vinod_yadav1919 Javascript How-To 0 January 18th, 2005 10:10 AM
Error Line 1: Incorrect syntax near '='. Calibus Classic ASP Databases 9 July 20th, 2004 02:22 PM
Parse error on line that does not exist shabboleth Beginning PHP 1 December 19th, 2003 01:41 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.