The entry point to Error properties and methods.
Sets or returns a descriptive string associated with an error.
object.Description[=Desc As String]
String.
Read/write.
Desc is an optional parameter that specifies an error description.
This example sets a descriptive string associated with the error.
err.Description="Invalid path is given"
print(err.Description)
Sets or returns a numeric value specifying an error.
object.Number[=Err As Integer]
Long.
Read/write.
Err is an optional parameter that specifies a numeric error value.
This example sets the numeric value 123.
err.number=123
print(err.number)
Returns or sets the name of the object or application that originally generated the error.
object.Source[=Object As String]
String.
Read/write.
Object is an optional parameter that specifies the name of an object or application.
This example sets the object name to GetChildren.
err.source="GetChildren"
print(err.source)
Clears all the property settings of the Error object.
object.Clear()
None.
Boolean. Returns TRUE if the error settings are cleared successfully. otherwise, FALSE.
This example clears all the property settings of the Error object.
print(err.number)
err.clear
print(err.number)
Generates a run-time error.
object.Raise(
number As Long,
[source As String,
desc As String]])
Boolean. Returns TRUE if the error is generated; otherwise, FALSE.
This example generates a run-time error.
print (err.Number)
print (err.Source)
print (err.Description)
err.Raise (Number, Source, Description)
print (err.Number)
print (err.Source)
print (err.Description)