# 錯誤變數

所有錯誤變數的值將會在指令碼執行後存在。第一個變數 ErrorMode 是從使用者輸入，並且最後三個是從具有指令碼中錯誤資訊的 QlikView 輸出。

使用各個函數的下拉式清單，查看各函數的簡短描述及語法。按一下語法描述中的函數名稱以取得更多詳細資料。

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ErrorVariables/ErrorVariables.htm)

#### ErrorMode

此錯誤變數會決定指令碼執行期間發生錯誤時，QlikView 將採取什麼動作。

[**ErrorMode**](https://help.qlik.com/zh-TW/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/Scripting/ErrorVariables/ErrorMode.htm)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ErrorVariables/ErrorVariables.htm)

#### ScriptError

此錯誤變數會傳回最後執行指令碼陳述式的錯誤碼。

[**ScriptError**](https://help.qlik.com/zh-TW/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/Scripting/ErrorVariables/ScriptError.htm)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ErrorVariables/ErrorVariables.htm)

#### ScriptErrorCount

此錯誤變數會傳回目前指令碼執行期間造成錯誤的陳述式總數。此變數一律在指令碼開始執行時重設為 0。

[**ScriptErrorCount**](https://help.qlik.com/zh-TW/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/Scripting/ErrorVariables/ScriptErrorCount.htm)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ErrorVariables/ErrorVariables.htm)

#### ScriptErrorList

此錯誤變數會將包含一份串連清單，其中列出上次指令碼執行期間發生的所有指令碼錯誤。每個錯誤都會以換行字元分隔。

[**ScriptErrorList**](https://help.qlik.com/zh-TW/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/Scripting/ErrorVariables/ScriptErrorList.htm)