Sun
ONE Active Server Pages Product Home Page Developer Site Version
 

ContentsPreviousNextIndex



Examples: ASP Server Object GetLastError Method

The following examples demonstrate different sorts of errors that will generate a 500:100 custom error. The three types of errors are:

Example 1

The following example produces a pre-processing error. The error will be generated because the #include statement is missing the file parameter for the statement.

<!--#include f="header.inc" -->
<%
Response.Write("sometext")
%>
   
Example 2

The following example produces VBScript syntax error 1028: "Expected 'While', 'Until' or end of statement."

<% 
    Dim A
   
    A = 0
    i = 0
    Do i < 10
       A = A + i
       i = i + 1 
    Loop 
%>
 
Example 3

The following example produces VBScript runtime error 450: "Wrong number of arguments or invalid property assignment."

<%
Dim A

A = 10

Function foo( x )
    foo = x + 1
End Function

A = foo()
%>


ContentsPreviousNextIndex