Instead of signing off with the customary 4Guys way of "Happy Programming" I'll use "Happy Programmer" - that's what I am now that I've found a way to make error handling Written exclusively for this professional code library, there's code you won't find anywhere else. Does it really return nothing in your case? I think you're right Wandrr, I don't think it supports .Line either.
Reply With Quote « Previous Thread | Next Thread » Posting Permissions You may not post new threads You may not post replies You may not post attachments You may The ASPError Object The ASPError object was implemented in ASP 3.0 and is available in IIS5 and later. Join UsClose Topics HTML CSS JS PHP Ruby Mobile UX Design Store Forums Subscribe Home Forum What's New? http://www.4guysfromrolla.com/webtech/021201-1.shtml err.source returns the error's class name or programmatic ID, not a line number. http://www.w3schools.com/asp/asp_ref_error.asp
An example of using the Raise object to generate our own custom error (with a more descriptive message and the line number) can be seen below:
1: <% 2: Option Why does the Developer Console show different extensions like "apxc" and "apxt"? Tuesday, November 09, 2010 2:16 PM Reply | Quote 0 Sign in to vote Actually, in JScript it's the semicolon (;). Funny timing.
Does anyone have any ideas of how to get the line number of an error? Learn more about our Microsoft Access coding tools. Subscribe to our monthly newsletter for tech news and trends Membership How it Works Gigs Live Careers Plans and Pricing For Business Become an Expert Resource Center About Us Who We Error Number Close Reply To This Thread Posting in the Tek-Tips forums is a member-only feature.
As I stated, this is not a "good" solution, as the logic of the original code might very well get altered in the process.Tom Lavedas Tuesday, November 09, 2010 1:40 PM Classic Asp Err Object Line Number Err.Line weird behavior The SitePoint Forums have moved. How do really talented people in academia think about people who are less capable than them? http://www.sitepoint.com/forums/showthread.php?279612-ASP-Error-Handling-Err-Line-weird-behavior Powered by vBulletinCopyright ©2000 - 2016, Jelsoft Enterprises Ltd.
Excel How many simultaneous Microsoft Access users? http://stackoverflow.com/questions/207646/how-to-handle-errors-in-vb-script If you have any other good tips for error checking please pass them along to me at [email protected] Asp Err Object CONTINUE READING Join & Write a Comment Already a member? Err.raise Vbscript Some even do syntax highlighting.
Powered by W3.CSS. Sending a stranger's CV to HR How or where should I add a required connection string for a feature in Helix? Join our community for more solutions or to ask questions. Code: <% dim objErr set objErr=Server.GetLastError() response.write("ASPCode=" & objErr.ASPCode) response.write("
") response.write("ASPDescription=" & objErr.ASPDescription) response.write("
") response.write("Category=" & objErr.Category) response.write("
") response.write("Column=" & objErr.Column) response.write("
") response.write("Description=" & objErr.Description) response.write("
") Asp File System Objects
Here's more on our Microsoft Access Developer Services. Awards Quality Pledge Microsoft Access Developer Center Strategic Overview Microsoft Access within an Organization's Database Strategy Microsoft Access vs. Login with LinkedIN Or Log In Locally Email Password Remember Me Forgot Password?Register ENGINEERING.com Eng-Tips Forums Tek-Tips Forums Search Posts Find A Forum Thread Number Find An Expert Resources Jobs How should I deal with players who prefer "realistic" approaches to challenges?
MR RE: get actual line number markdmac (MIS) 2 Feb 07 09:45 Depends on your editor.In notepad ensure line wrap is off and press Ctrl+G then type the line number and On Error Resume Next RE: get actual line number markdmac (MIS) 2 Feb 07 12:42 Turning off On Error Resume Next will give you the line and place int he line that the error actually It's pretty much always available on any machine that has VBS on it. (Start/Run/Notepad)Tom Lavedas Wednesday, November 03, 2010 6:19 PM Reply | Quote Moderator 0 Sign in to vote @
You may have to register before you can post: click the register link above to proceed. samsung * Bind to WMI provider on computer 'PCDIDIER'... * Bind successful * Get printer 'SAMSUNG' characteristics by DeviceID Default : True DriverName : Samsung CLP-310 Series Horizontal Resolution: 600 Network Are you aComputer / IT professional?Join Tek-Tips Forums! It finds hundreds of types of errors, suggestions, and performance tips specific to your database objects.
If you are wanting to know easily which line of your script is line 88 like in the exception message above, then there are a number of freeware editors that will Now consider a script like this one that has Error checking turned on:
<% Option Explicit On Error Resume Next Dim Conn Dim strSQL Set Conn = Server.CreateObject("ADODB.Connection") 'this DSN Simply Riddleculous Was user-agent identification used for some scripting attack techique? Error handling in your VB6/VBA code lets you trap unexpected errors and gracefully exit your application without causing an end user to suffer an unhandled crash on their own.
Join the community of 500,000 technology professionals and ask your questions.