@mike.maxwell is there a way to catch the "No route to host" error in
def hubAction = new hubitat.device.HubAction
I already tried below code and it doesn't get that far.
} catch (e) {
log.error "something went wrong: $e"
}
@mike.maxwell is there a way to catch the "No route to host" error in
def hubAction = new hubitat.device.HubAction
I already tried below code and it doesn't get that far.
} catch (e) {
log.error "something went wrong: $e"
}
Scott
This might work for you...
Within your ‘catch’ method:
def error1 = e
if(error1.contains(“No route to host”)){ // use exact case & spelling for expected error message
do something here
}
else{
do something else
}
Andy
I realize now why why all my attempts at groovy failed. I was missing the Andy command.
I went a different way since I couldn't get it working. Thanks @Cobra
I 0nly said it might work
I didn’t get a chance to test it.
No worries !! I got what I wanted to work... a little hacky but it works !