SocketConnect causes unrecoverable error on invalid address string
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.5K RobotStudio
- 394 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 309 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 783 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings