VBScript » Err » Source

Version: 1.0

Syntax:
object. Source [ =string]
string
Used when generating errors in your code to identify your application as the source of the error.

This property lets us determine the object or application that caused an error, and returns a string that contains its Class name or programmatic ID.

Also used when generating errors in your code to identify your application as the source, using the optional [ = string] argument, as below.

Examples

Code:
<%
On Error Resume Next
Err.Raise 8 'raise a user-defined error
Err.Description = "My Error"
Err.Source = "MyAppName"
Response.Write "An Error of the type '" Err.Description "' has been_ caused by '" Err.Source "'."
%>
Output:
"An Error of the type 'My Error' has been caused by 'MyAppName'."