Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New Exception Behavior 4.2.16?
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....

Method TestExcept()
            String  strVal("ABC123");
            String  strTemp;

            // Extract an Invalid Index
            ConOut.FmtStr("Should not ever hit here");

            ConOut.FmtStr("Exception Caught");

Attached Files
.cqcmacropack   Exceptiontest.CQCMacroPack (Size: 575 bytes / Downloads: 0)
My Home Theater/Automation Website

[THREAD=5957]BlueGlass CQC Config[/THREAD]
[THREAD=10624]Wuench's CQC Drivers[/THREAD]
Yes, that is an issue. It's on the list to deal with, but for now you just shouldn't have anything between a try and a catch at all, and when I fix it that will be disallowed, as it is in any exception based language AFAIK.
Dean Roddey
Explorans limites defectum

Possibly Related Threads…
Thread Author Replies Views Last Post
  Unhandled system exception in the GUI Thread gReatAutomation 9 2,488 03-23-2020, 01:03 PM
Last Post: Dean Roddey
Photo Unhandled GUI Exception simplextech 3 1,410 01-05-2020, 03:27 PM
Last Post: zra
  Odd LogicSvr behavior gReatAutomation 2 1,250 08-14-2019, 12:40 PM
Last Post: Dean Roddey
  Unhandled system exception in GUI Thread Shaky 75 22,063 06-21-2019, 08:10 PM
Last Post: kblagron
  Odd behavior of Admin interface Mark Stega 1 1,927 10-22-2017, 09:12 AM
Last Post: Dean Roddey
  Field Boolean Image behavior pinballmark 6 3,108 12-28-2015, 04:45 PM
Last Post: pinballmark
  Unhandled Exception Scheduled Events zra 8 4,205 06-25-2015, 05:54 PM
Last Post: zra
  An unknown exception has occured... brathnach 11 4,686 11-10-2013, 06:08 PM
Last Post: brathnach
  FileOutStream Exception wuench 3 2,066 12-29-2012, 08:15 PM
Last Post: Dean Roddey
  unhandled exception Ron Haley 3 1,708 11-13-2012, 08:55 PM
Last Post: Dean Roddey

Forum Jump:

Users browsing this thread: 1 Guest(s)