Changeset 1191


Ignore:
Timestamp:
Mar 2, 2022 10:25:16 AM (9 months ago)
Author:
ilavsky
Message:

Catch inaccessible server from outside

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/User Procedures/Indra 2/IN3_BlueSkyReader.ipf

    r1190 r1191  
    6060        SVAR ListOfCatalogs=root:Packages:Irena:BlueSkySamplePlot:ListOfCatalogs
    6161        ListOfCatalogs=""
    62         JSONXOP_Parse(FetchURL(TempAddress))
     62        string response = FetchURL(TempAddress)
     63        Variable error = GetRTError(1)  // Check for error before using response
     64        if (error != 0)
     65                abort "Server not accessible"
     66        endif
     67        JSONXOP_Parse/Z  (response)
     68        if(V_Flag!=0)
     69                abort "Cannot parse server response"
     70        endif
    6371        jsonId = V_Value
    6472        //print jsonID
Note: See TracChangeset for help on using the changeset viewer.