Calling ReportError When Errors Occur

The ReportError method creates an XML data stream that contains error information and returns the XML to the browser. The following code fragment shows how properties of the err object are inserted into the message:

oResponse.Write "<xmldata>" & vbCrLf & _
               "<error>" & vbCrLf & _
               "<number>" & Hex(err.number) & "</number>" & vbCrLf & _
               "<description>" & err.description & "</description>" & vbCrLf & _
               "<source>" & err.source & "</source>" & vbCrLf & _
               "</error>" & vbCrLf & _
               "</xmldata>"