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?
0
Comments
-
0
-
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.
0
Categories
- All Categories
- 5.4K RobotStudio
- 383 UpFeed
- 14 Tutorials
- 12 RobotApps
- 291 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 247 ScreenMaker
- 2.7K Robot Controller
- 279 IRC5
- 46 OmniCore
- 6 RCS (Realistic Controller Simulation)
- 3 RobotStudio AR Viewer
- 733 RAPID Programming
- 15 Wizard Easy Programming
- 105 Collaborative Robots
- 3 Job listings