Is it possible to handle error caused in an UNDO-handler (alternatively check if routine exists)
I am calling a routine from an UNDO-handler(with late binding) that may or may not exist. My problem is that if it does not exist, it "destroys" the UNDO chain. I have tried handling the error but it does not work.
If there is a possibility to check if a routine exist before actually calling it that would solve my problem.
If there is a possibility to check if a routine exist before actually calling it that would solve my problem.
//Markus Näslund
0
Best Answer
-
Someting like that might help:FUNC bool Call_Routine(string Input)%Input%;
RETURN TRUE;
ERROR
IF ERRNO=ERR_REFUNKPRC THEN
SkipWarn;
RETURN FALSE;
ENDIF
ENDFUNCBasically you call the routine and return True if it suceeded and False if it didn't.Don't think there is any Built-IN Routine to check that.You can't handle an Error that occured in a Undo routine.5
Answers
-
AWAS said:Someting like that might help:FUNC bool Call_Routine(string Input)%Input%;
RETURN TRUE;
ERROR
IF ERRNO=ERR_REFUNKPRC THEN
SkipWarn;
RETURN FALSE;
ENDIF
ENDFUNCBasically you call the routine and return True if it suceeded and False if it didn't.Don't think there is any Built-IN Routine to check that.You can't handle an Error that occured in a Undo routine.
I can't believe I did not think of that!
I was so stuck in the fact that I can't handle an error that occured in an undo handler that it did not occur to me to try the late binding call in a function.
Thanks again, I was really stuck here.//Markus Näslund0
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)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings