Advertisement

10.21.2005 at 07:27AM PDT, ID: 21603114
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.8

Meaningful error messages using Sub TrapError - is it possible?

Asked by tingleweb in Active Server Pages (ASP)

Tags:

Hello again

In one of my pages - I know customers are experiencing problems so I have this in place with the hope that I can work out what is going wrong as I cant reproduce it.

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::      
Sub TrapError(oErr)
     If Not oErr.number = 0 Then
          strErrorMessage = "At " & Now & " the following errors occurred on the page " & Request.ServerVariables("SCRIPT_NAME") & "<br>" &_
              "error number: " & oErr.Number & "<br>" &_
          "error source: " & oErr.source & "<br>" &_
          "error description: " & oErr.description & "<br>"
     
          Call SendMail("me@me.com", "me@me.com", "", "WEBSITE ERROR OCCURRED", strErrorMessage)
          Response.Write "For security reasons, your session has expired.  Please click the back button to return to the payment page and try again"
          Response.End()
     End If
End Sub

Sub SendMail(sTo, sFrom, sReplyTo, sSubject, sBody)
     If sReplyTo = "" Then sReplyTo = sFrom
     Set oMail = Server.CreateObject("CDONTS.Newmail")
     With oMail
          .MailFormat = 0
          .BodyFormat = 0
          .To = sTo               'set 'To' address
          .From = sFrom          'set 'From' address
          .Value("Reply-To") = sReplyTo     'set 'Reply to' address
          .Subject = sSubject     'set the subject line
          sHTML =_
          "<HTML>" &_
          "<HEAD>" &_
          "<TITLE>" & sSubject & "</TITLE>" &_
          "</HEAD>" &_
          "<BODY>" & sBody & "</BODY>" &_
          "</HTML>"
          .Body = sHTML          'set the message content
          .Send               'and send the message
     End With
     Set oMail = Nothing          'then destroy the component
End Sub
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

/Payment.asp contains a series of SP executes.

The kind of email I get back is something like:


At 19/10/2005 11:49:30 the following errors occurred on the page /Payment.asp
error number: -2147217900
error source: Microsoft OLE DB Provider for ODBC Drivers
error description: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near ','.


It's just not very meaingful - is there anything I can add to make the message more meaningful as at the moment I can see the time people experience an error but that's all?  
Start Free Trial
[+][-]10.21.2005 at 07:31AM PDT, ID: 15132605

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.21.2005 at 07:37AM PDT, ID: 15132662

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.21.2005 at 08:52AM PDT, ID: 15133375

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.22.2005 at 01:58AM PDT, ID: 15137525

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.30.2005 at 03:52PM PST, ID: 15189745

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.20.2005 at 02:32AM PST, ID: 15328662

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.08.2006 at 05:15PM PST, ID: 15645171

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.08.2006 at 05:23PM PST, ID: 15645213

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Active Server Pages (ASP)
Tags: traperror
Sign Up Now!
Solution Provided By: fritz_the_blank
Participating Experts: 5
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32