I assume that you do not have access to the source code, so if it outputs to the graphical interface, the answer is no. Even if you can connect to the running process, you will need to catch the exception, but it is caught and sent to the graphical interface, and not selected from the application.
In theory, you can screen an application. I do not know any special tools for this, but they can be there.
Edit: Perhaps I was mistaken above, view the message here where they get the stack from the working thread. You probably won’t be able to catch the exception, but if you are lucky, the stack trace will look very different if the program works fine compared to when the exception was thrown.
Edit 2: I presented a second, more accurate answer. See below.
source share