In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article introduces the knowledge of "the use of the Source attribute in VBS". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Returns or sets the name of the object or application that originally generated the error.
Object.Source [= stringexpression]
Parameter object
Err object.
Stringexpression
A string expression that represents the application that generated the error.
Description
The Source property specifies a string expression, which is usually the class name of the object that caused the error or the ID of the program design. Use Source to provide information to users when the code cannot handle errors caused by accessible objects. For example, if you access Microsoft Excel and produce an error divided by zero, Microsoft Excel sets Err.Number to the error code for this error and Source to Excel.Application. Note that if the error occurs in another object called by Microsoft Excel, Excel intercepts the error and sets Err.Number to its own code divided by zero. However, it retains other Err objects, including Source, just as it was set by the object that caused the error.
Source always contains the name of the object that caused the error in the first place, and you can write code to handle the error based on the error information document of the object you access. If the error handler fails, you can use the Err object information to describe the error for the user, and use Source and other Err to inform the user of the object that initially caused the error, the error description, and so on.
Source is the programming ID of the application when an error is generated in the code.
The following code illustrates how to use the Source property:
On Error Resume NextErr.Raise 6 'Raise an overflow error.MsgBox ("Error #" & CStr (Err.Number) & "& Err.Description & Err.Source) Err.Clear' Clear the error." the usage of the Source attribute in VBS "ends here. Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.