3
我試圖在BeanShell中運行簡單的腳本
運行一個簡單的switch-case語句時,BeanShell的newbie-得到錯誤這是代碼我想run--
temp = assignee.toString();
switch(temp.toString())
{
case 'missing' : check = "missing"; break;
case '404' : check = "404"; break;
default: check = "data"; break;
}
但我得到以下錯誤 -
ERROR - Error during script execution: Sourced file: inline evaluation of: ``temp = assignee.toString(); switch(temp.toString()) { case 'missing' : check = . . . '' Token Parsing Error: Lexical error at line 3, column 8. Encountered: "i" (105), after : "\'m"
org.webharvest.exception.ScriptException: Error during script execution: Sourced file: inline evaluation of: ``temp = assignee.toString(); switch(temp.toString()) { case 'missing' : check = . . . '' Token Parsing Error: Lexical error at line 3, column 8.
Encountered: "i" (105), after : "\'m"
at org.webharvest.runtime.scripting.BeanShellScriptEngine.eval(Unknown Source)
我在做什麼錯在這裏?我如何解決這個錯誤?在BeanShell的