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

Windows 腳本宿主  

SourceText 屬性

包含導(dǎo)致錯誤的源代碼行。

Object.SourceText

參數(shù)

Object
WshRemoteError 對象。

說明

SourceText 屬性返回一個字符串。

不是任何情況下都可以獲得源文本。如果得不到源文本,SourceText 屬性將返回一個空字符串。

示例

下面的代碼演示 WshRemoteError 對象如何展示導(dǎo)致錯誤的源代碼行。

[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 & vbCrLf & "Source Text: " & theError.SourceText
    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 + "\nSource Text: "_+ theError.SourceText);
    WScript.Quit(-1);
}

請參閱

WshRemote 對象 | WshRemoteError 對象 | Description 屬性 | Line 屬性 | Character 屬性| Number 屬性 | Source 屬性