11-19-2012, 08:50 AM
I just noticed this behavior when working on a driver and it seems new. The gist is that exceptions are booting you out of the Try block but not directly into the Catch block, so anything in between gets run. I am pretty sure it didn't used to be this way, I have compiled and attached a sample macro to demonstrate.
I can't remember ever having to exclude stuff from inbetween EndTry and Catch, but it seems like some sort of enforcement is necessary here if this is how it is going to be....
I can't remember ever having to exclude stuff from inbetween EndTry and Catch, but it seems like some sort of enforcement is necessary here if this is how it is going to be....
Code:
Method TestExcept()
Begin
Locals=
String strVal("ABC123");
String strTemp;
EndLocals;
Try
// Extract an Invalid Index
strVal.ExtractSubStr(8,Card4.kMaxValue,strTemp);
EndTry;
ConOut.FmtStr("Should not ever hit here");
ConOut.NewLn();
ConOut.Flush();
Return;
Catch
ConOut.FmtStr("Exception Caught");
ConOut.NewLn();
ConOut.Flush();
EndCatch;
EndMethod;
Wuench
My Home Theater/Automation Website
[THREAD=5957]BlueGlass CQC Config[/THREAD]
[THREAD=10624]Wuench's CQC Drivers[/THREAD]
My Home Theater/Automation Website
[THREAD=5957]BlueGlass CQC Config[/THREAD]
[THREAD=10624]Wuench's CQC Drivers[/THREAD]