DIR Return Create A Forum - Home
---------------------------------------------------------
knowledge-space
HTML https://sravanks.createaforum.com
---------------------------------------------------------
*****************************************************
DIR Return to: Dictionary
*****************************************************
#Post#: 9--------------------------------------------------
Try Catch in Javascript
DIR By: sravan
Date: September 27, 2017, 5:37 am
---------------------------------------------------------
--- Quote ---
>
>
> var isServiceDown = 0;
>
> try{
>
JSON.parse(context.getVariable("calloutResponse").getContent());
//javascript throws this error
> }catch(e){
> print("e "+ e); //Error : Empty JSON/String
> isServiceDown = 1
> }
>
>
--- End Quote ---
[attach=1]
*****************************************************
Page 1 of 1