On Error Resume Next
Err.Clear
Set myObj = CreateObject("SomeKindOfClassThatDoesNotExist")
If Err.Number <> 0 Then
WScript.Echo "Error: " & Err.Number
WScript.Echo "Error (Hex): " & Hex(Err.Number)
WScript.Echo "Source: " & Err.Source
WScript.Echo "Description: " & Err.Description
Err.Clear
End If
On Error Goto 0
WScript.Echo "This text will always print."
vbs 异常
最新推荐文章于 2016-01-12 23:05:14 发布