cancel
Showing results for 
Search instead for 
Did you mean: 

unexpected token { Error message

Former Member
0 Kudos


Hi all,

IF (session.info.transaktion == "VA03") {

session.utils.log("reached VA03");

}  ELSE {

  session.utils.log("could not reach VA03");

   EXIT; 

}

If I validet the scripting above I got the mesage:

unexpected token {

What is wroung ?

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

and EXIT?? 🙂

Former Member
0 Kudos

Hello,

it was still the same bad habit.


Answers (3)

Answers (3)

Former Member
0 Kudos

Hello Steve Rumsby,

many thanks for your helpfull answer.

It is a old habit, to write this in capitals.

0 Kudos

IF and ELSE should be lowercase in javascript

Former Member
0 Kudos

Hi Sushant Priyadarshi,

many thanks for your helpfull answer.

It is a old habit, to write this in capitals.

Former Member
0 Kudos

Javascript is case sensitive - the keywords (IF, ELSE, etc.) must be in lower case.

Also, you can't use "exit" to exit a script. You can, in the browser at least, use "return" (the script engine in Windows GUI objects to "return" in this context), but it would be better to structure your script to avoid this completely.

Steve.