Hi
It seems to me that there must be some way of using the stacktrace to determine what level a particular subroutine is... if I'm not using the right terminology, by this - I mean - an HMI click subroutine would be Level 1, a sub it calls Level 2, etc...
The reason I am asking is because I am working on my exception handling... if I generate a completely unexpected error, I want my code to shut down... so what I do is to throw a new user-defined exception ("UnexpectedException") that 'bumps' me up through my subroutines... I keep throwing this exception until I reach the top level but can't throw it on the top level as that would crash the program...
Hopefully this makes some sense?
Thanks!
-Justin
It seems to me that there must be some way of using the stacktrace to determine what level a particular subroutine is... if I'm not using the right terminology, by this - I mean - an HMI click subroutine would be Level 1, a sub it calls Level 2, etc...
The reason I am asking is because I am working on my exception handling... if I generate a completely unexpected error, I want my code to shut down... so what I do is to throw a new user-defined exception ("UnexpectedException") that 'bumps' me up through my subroutines... I keep throwing this exception until I reach the top level but can't throw it on the top level as that would crash the program...
Hopefully this makes some sense?
Thanks!
-Justin