%
Dim strErrorMessage
Dim bolErrors
'Initialize variables
strErrorMessage = "" 'The error messages for tech. support
bolErrors = False 'Have we found any errors yet?
'Now our two subs
sub TrapError(strError)
bolErrors = True 'Egad, we've found an error!
strErrorMessage = strErrorMessage & strError & ", "
end sub
'If there are any errors, this function will email tech. support
sub ProcessErrors(debug)
if bolErrors then
'Send the email
Dim objCDO
'funktioniert noch nicht, weil ??? (SMTP muss laufen, Absenderadresse muss existieren ...
'Set objCDO = Server.CreateObject("CDONTS.NewMail")
'objCDO.To = "a.mueller@bgbm.org"
'objCDO.From = "a.mueller@bgbm.org"
'objCDO.Subject = "AN CONNECTION ERROR OCCURRED"
'objCDO.Body = "At " & Now & " the following errors occurred on " & _
' "the page " & Request.ServerVariables("SCRIPT_NAME") & _
' ": " & _
' chr(10) & chr(10) & strErrorMessage
'objCDO.Send
Set objCDO = Nothing
'Now, we've got to print out something for the user
Response.Write "There has been a database error.
" & _
""
'"Technical Support " & _
'"has already been notified. You will be informed when " & _
'"this issue is resolved. Thank you for your patience!"
if (debug = true) then
Response.Write "(" & strErrorMessage & ")"
end if
end if
end sub
%>