RobotStudio event

SocketConnect causes unrecoverable error on invalid address string

Options
When trying to start a socket connection as a client using the SocketConnect command,
I ran into the issue that this command will cause an unrecoverable error on my system in case the address string is invalid. (I am currently running RobotWare 6.08.01)
From what I found out so far, an "invalid" IP address can be a malformed IP string, but apparently also IP addresses that are outside of the robot's subnet. Since the IP address I connect to is defined dynamically, I would like to be able to handle this issue in my program in case the address is invalid rather than just stopping everything.

Since its an unrecoverable error, I assume there is no option for error handling for me here. But is there a way to check, if a string represents a valid, reachable IP address before passing it to SocketConnect?




Tagged:

Comments

  • Error is the same as the one described in here

  • FlorianAumann
    Options
    Update on this: Looks like this issue has been improved in RW 6.10.02, where SocketConnect now throws recoverable errors in this situation and we can use the new error codes ERR_SOCK_UNSPEC and ERR_SOCK_ADDR_INVALID to catch these errors.