Thursday, March 3, 2011

Archicad 10 Build188 Con Medicina

On Error Resume Next

In ASP there are no try catch blocks.

E 'but can handle errors at runtime.
Here is the statement:

\u0026lt;% On Error Resume Next %>

This statement tells the ASP to continue execution, however, ignoring the ' error.

In general, the error can be handled:

\u0026lt;% On Error Resume Next

'code ...
'the line that generates the error Response.Write
(10 / 0)

'
handle the error If Err.Number \u0026lt;> 0 then
NumeroErrore
DescrizioneErrore = Err.Number = Err.Description
page = Request.ServerVariables ("url")
Call GestisciErrore (NumeroErrore, DescrizioneErrore, Page) End If



'The procedure for error handling
Sub GestisciErrore (NumeroErrore, DescrizioneErrore, Page)
' compose message
Message = "Error ' zenith "
& vbCrLf Message = Message &" Error Number: "& NumeroErrore
& vbCrLf Message = Message & "Error Description:" & vbCrLf Message = Message &
DescrizioneErrore
& vbCrLf Message = Message & "Page:" & vbCrLf & Home
'send the mail Set objMail
= Server.CreateObject ("CDONTS.NewMail")
objMail.From = "Erors@myweb.it"
objMail.To = "webmaster@myweb.it"
objMail.Subject = "Error in Application" message
objMail.importance
objMail.Body = = 0
objMail.Send
= Nothing Set objMail

'cleaned Err Err.Clear

' redirect the user
Response.Redirect ("PaginaMessaggio.asp") End

Sub%>

0 comments:

Post a Comment