REST error and how to trap for it

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Post Reply
xavram
Dragon
Posts: 891
Joined: Tue Apr 20, 2010 8:22 pm

REST error and how to trap for it

Post by xavram »

I have a simple macro that plays sounds via Syrinscape

[h, if(getLibProperty("SoundsEnabled") == "1"), code : {
[h : baseUrl = baseUrl + "/play/?auth_token=" + getLibProperty("SoundAuthToken")]
[h : REST.get(baseUrl)]
}]

Every now and then, I get an error that looks like...

Unable to process function "REST.get", An Exception has occurred: java.net.SocketTimeoutException: timeout

Is there any way to trap for this error and if it happens, just go on and don't play the sound but let the rest of the macro continue to process?

Post Reply

Return to “MapTool”