Microsoft® Visual Basic® Scripting Edition Source Property |
| Language Reference |
|
Returns or sets the name of the object or application that originally generated the error.
object.Source [= stringexpression]
The Source property syntax has these parts:
Part Description object Always the Err object. stringexpression A string expression representing the application that generated the error.
The Source property specifies a string expression that is usually the class name or programmatic ID of the object that caused the error. Use Source to provide your users with information when your code is unable to handle an error generated in an accessed object. For example, if you access Microsoft Excel and it generates a Division by zero error, Microsoft Excel sets Err.Number to its error code for that error and sets Source to Excel.Application. Note that if the error is generated in another object called by Microsoft Excel, Excel intercepts the error and sets Err.Number to its own code for Division by zero. However, it leaves the other Err object (including Source) as set by the object that generated the error.Source always contains the name of the object that originally generated the error your code can try to handle the error according to the error documentation of the object you accessed. If your error handler fails, you can use the Err object information to describe the error to your user, using Source and the other Err to inform the user which object originally caused the error, its description of the error, and so forth.
When generating an error from code, Source is your application's programmatic ID.
file: /Techref/language/asp/VBS/VBSCRIPT/359.htm, 3KB, , updated: 1996/11/22 10:12, local time: 2024/11/28 06:17,
3.12.161.151:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://ecomorder.com/techref/language/asp/VBS/VBSCRIPT/359.htm"> Microsoft® Visual Basic® Scripting Edition </A> |
Did you find what you needed? |
Welcome to ecomorder.com! |
Welcome to ecomorder.com! |
.