Forum Discussion
Bret_McGinnis_1
Nimbostratus
Sep 20, 2005TCL runtime errors
Hi, is there a way to capture and process iRule TCL runtime errors. On a few occasions I have created and tested an iRule and in our lab and it works fine. When I implement the iRule on a production B...
Bret_McGinnis_1
Nimbostratus
Nov 16, 2005I'm back. The only outstanding issue on this thread is the TCL error when I terminate iRule processing using "return" while within a "catch". At the end of the catch I check the RC and if it is != 0 I send a log message with the error.
Normal processing: When the iRule completes (RC 0)and there were no errors I don't get a log message.
Exception processing: When the iRule encounter an error (TCL runtime - RC != 0) the iRules terminates and send a log message with the error from the catch command.
Return processing: I terminate the iRule by issuing a "return" command. I am expecting a RC 0 and not log message. What I am getting is RC 0 and a log message showing the error as "0".
What am I doing wrong?
Sample iRule:
if { [catch {
.... return
} lb_selected] != 0} {
log local0.error "iRule captured TCL error: $lb_selected"
}
Log message:
Nov 15 15:47:38 tmm tmm[705]: Rule xxxx : iRule captured TCL error: 0
Regards,
Bret
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects