Recovering from, or ignoring errors


First of all, I’m new to this forum and I’m having a great time with uLisp.

A project of my continually polls a server using with_client sometimes however this server is not available and uLisp stops the loop and gives me the error “Error: ‘with-client’ connection failed”.

I’m ooking for a way to ignore this error and continue with the polling loop but do not know how. I’ve looked at the documentation but cannot find anything.

Is this possible?

Thank you.


I agree that this isn’t very helpful. I’ll investigate whether there’s a solution to this.


Okay thank you very much!, in the meantime I forked the code to just ignore the error.


My proposed solution is to change the line in sp_withclient() from:

if (!success) error(PSTR("'with-client' connection failed"));


if (!success) return nil;

You can then test for the return value nil and continue if you want to. Does this meet your requirements? Would a different value be more useful to distinguish this case from server.available() failing?


Yes, that is what I have done. For me this is a good solution. Thank you very much!