欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Windows 腳本宿主  

Error 屬性 (WshRemote)

展示 WshRemoteError 對象,它保留有關(guān)導(dǎo)致遠程腳本過早終止錯誤的信息。

Object.Error

參數(shù)

Object
WshRemote 對象。

說明

Error 屬性返回 WshRemoteError 對象。

示例

下面的代碼演示 WshRemote 對象的 Error 屬性如何展示 WshRemoteError 對象,其中包括行、字符和錯誤說明。

[VBScript]
Dim Controller, RemoteScript
Set Controller = WScript.CreateObject("WSHController")
Set RemoteScript = Controller.CreateScript("test.js", "remoteserver")
WScript.ConnectObject RemoteScript, "remote_"
RemoteScript.Execute

Do While RemoteScript.Status <> 2 
    WScript.Sleep 100
Loop

Sub remote_Error
    Dim theError
    Set theError = RemoteScript.Error
    WScript.Echo "Error - Line: " & theError.Line & ", Char: " & theError.Character & vbCrLf & "Description: " & theError.Description
    WScript.Quit -1
End Sub
[JScript]
var Controller = WScript.CreateObject("WSHController");
var RemoteScript = Controller.CreateScript("test.js", "remoteserver");
WScript.ConnectObject(RemoteScript, "remote_");
RemoteScript.Execute();

while (RemoteScript.Status != 2) {
    WScript.Sleep(100);
}

function remote_Error()
{
    var theError = RemoteScript.Error;
    WScript.Echo("Error - Line: " + theError.Line + ", Char: " + theError.Character + "\nDescription: " + theError.Description);    WScript.Quit(-1);
}

請參閱

WshController 對象 | WshRemote 對象 | WshRemoteError 對象 | Status 屬性 | Execute 方法 | Terminate 方法 | Start 事件 | End 事件 | Error 事件