Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Error Notification
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Error Notification

 Post Reply Post Reply
Author
VBScript View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2004
Location: United Kingdom
Status: Offline
Points: 219
Post Options Post Options   Thanks (0) Thanks(0)   Quote VBScript Quote  Post ReplyReply Direct Link To This Post Topic: Error Notification
    Posted: 09 August 2006 at 5:02pm
I am working on an ASP page which is executed but another ASP page that sends post data to it.

So for this reason. I cannot actually see the pages response or any error messages.

Is it possible to get an Error Message into a variable? I need something that will capture an error message where ever it occurrs in the page?

Is this possible?
Back to Top
dfrancis View Drop Down
Senior Member
Senior Member


Joined: 16 March 2005
Location: United States
Status: Offline
Points: 442
Post Options Post Options   Thanks (0) Thanks(0)   Quote dfrancis Quote  Post ReplyReply Direct Link To This Post Posted: 09 August 2006 at 6:28pm
Is it a server error or a script error? Do you know? I spent a good amount of time writing my own error traps and it is possible.
 
If Request("FormField") = "" Then
MyError = "Form value empty"
End If
 
If it is processing through an auto subit then try something like
 
If Request("FormField") = "" Then
Response.Write("<input type=hidden name=myerror value=""form value empty"">")
End if
 
I have a couple other ideas but the server I use for a playground appears to be offline t the moment. In other words, I have more urgent needs at the moment.
 
Hope that helps. (Off the top of my flat head)
 
 
Back to Top
VBScript View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2004
Location: United Kingdom
Status: Offline
Points: 219
Post Options Post Options   Thanks (0) Thanks(0)   Quote VBScript Quote  Post ReplyReply Direct Link To This Post Posted: 09 August 2006 at 7:07pm
Just any ASP generated erorr.

Like If I Had

"If VarA = VarB The" When It should be "If VarA = VarB Then"

i want the error message to be put into a variable which can then be logged.
Back to Top
dfrancis View Drop Down
Senior Member
Senior Member


Joined: 16 March 2005
Location: United States
Status: Offline
Points: 442
Post Options Post Options   Thanks (0) Thanks(0)   Quote dfrancis Quote  Post ReplyReply Direct Link To This Post Posted: 09 August 2006 at 8:08pm
You'll like have to write your own else if's for each then. I went through this with a large data set I was processing and there is no easy way that I know of.
 
The easiest way is to do a response write of each of your vars to see what they are sending unless you need an ongoing log of errors after you publish the app.
 
Just my 2 cents.
 
Good luck
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 10 August 2006 at 12:38am
One way to do it is by instructing asp at the beginning of a script to ignore errors and then check for an error code at the end of the script and print the error.

In the beginning of the code you want to check, put..
On Error Resume Next

At the end of the code you want to check, put...

If Err <> 0 Then
   Response.Write Err & " - " & Err.Description
End If


EDIT: This will id your errors from the bottom up.


Edited by dpyers - 10 August 2006 at 12:40am

Lead me not into temptation... I know the short cut, follow me.
Back to Top
VBScript View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2004
Location: United Kingdom
Status: Offline
Points: 219
Post Options Post Options   Thanks (0) Thanks(0)   Quote VBScript Quote  Post ReplyReply Direct Link To This Post Posted: 10 August 2006 at 7:48am
Thank you very much Dpyers
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.