Looks like you hit the nail on the head!
I’m not terribly familiar with this code as another developer wrote it.
There is a try/except block in the switchMicrometerProgram() function. The last line of the except section contains the line:
sys.exit(0)
Looking at the Python doc for this function, it seems this “exits from Python” and raises the exception.
I’m not an application developer, just an old electrical engineer pretending to be a software guy!
It doesn’t seem like this is hurting anything, but, is this the proper way to raise an exception in a script in Ignition?