I am trying to run a simple switch-case statement in Beanshell
This is the code I am trying to run--
temp = assignee.toString();
switch( temp.toString() )
{
case 'missing' : check = "missing"; break;
case '404' : check = "404"; break;
default: check = "data"; break;
}
But I am getting the following error--
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)
What am I doing wrong here? How do I resolve this error?