Print Page | Close Window

On Error Object

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=2490
Printed Date: 29 March 2026 at 7:39pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: On Error Object
Posted By: pmormr
Subject: On Error Object
Date Posted: 07 May 2003 at 5:38pm

Is there anyway to use something simalar to "ON ERROR RESUME NEXT" which tells the processor to continue if there an error, to stop processing and not display anything. (i know this doesn't work but you should get the idea what i want from it) "ON ERROR response.end"

is that possible to do. its important that if there's an error that nothing be displayed at all. No error message or anything.

 



-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/



Replies:
Posted By: MorningZ
Date Posted: 07 May 2003 at 7:36pm

It'll be better to set up your server to redirect a 500 error to an empty page

and question: why would you not want to know what the issues with your site's code is??  that's not very good programming practice, not good at all



-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: Mart
Date Posted: 08 May 2003 at 9:55am

You can use ON ERROR GOTO SOMETHING I then I think you just go

<%

something:

response.end

%>

Haven't used that before so correct me if the second bit is wrong...



Posted By: WebWiz-Bruce
Date Posted: 08 May 2003 at 1:35pm
You can use 'On Error Resume Next' in ASP, simply place it at the top of your script.

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: Mart
Date Posted: 08 May 2003 at 1:58pm
He doesn't want that, he wants a blank page to be shown when an error occurs...


Posted By: MorningZ
Date Posted: 08 May 2003 at 2:08pm

"i still think that's as bad an idea as Greedo shooting first"

as a programmer, one would want to know when an error occurs so they can fix it..... instead of having site users going: "errr, what's wrong here, maybe i'll see if hitting refresh 100 times fixes it"

 



-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: WebWiz-Bruce
Date Posted: 08 May 2003 at 2:27pm
I think it is bad programming as well, but there have been a few times when I have enabled just before uploading a file to a site just so that the page doesn't show the normal site user an error message.

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: Mart
Date Posted: 08 May 2003 at 2:48pm

Ok got it now this works

<%

ON ERROR RESUME NEXT

%>

at the top of the page and at the very bottom

<%

If Err.number <> 0 Then

response.end

End IF

%>

That definatley works because I just tested it... (famous last words)



Posted By: pmormr
Date Posted: 08 May 2003 at 3:07pm
i do want to know if i have errors in my code... i want extra security: i have a logging program on my administration page. if the logging program fails then i want nothing to display because it means that their idenity wasn't logged (get me?). (Just in case a hacker uses something to delete my logging file)

-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/


Posted By: Bliss
Date Posted: 10 May 2003 at 5:03pm
Wait, let me get you straight here, you want to show the error, but you want a blank page?


Posted By: pmormr
Date Posted: 10 May 2003 at 6:29pm

you don't get me.
let me tell you the hole story:

i have a script that records an IP address. but if theres an error i can't afford having the script continue in anyway and display the rest of the page. therefore, when an error occurs i want nothing to display. an error would mean that the IP wasn't logged. this is in case someone causes something to happen and hacks into my system. nothing will display. get me?



-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net