websss
asked on
Force app to crash and not show dialog box?
There isn't a way to prevent the message coming up other than fixing it or 'handling he exception.'
You could run in in a different session to prevent it displaying on your screen but that wouldn't stop it appearing as such as it would just appear on a different desktop session.
It may be possible to deal with the error when shown though. Many automation tools can monitor for that window and take a pre-planned action (clicking OK) to get rid of it.
if this is worth a go, try tools like Think Automation or Autohotkey etc.
You could run in in a different session to prevent it displaying on your screen but that wouldn't stop it appearing as such as it would just appear on a different desktop session.
It may be possible to deal with the error when shown though. Many automation tools can monitor for that window and take a pre-planned action (clicking OK) to get rid of it.
if this is worth a go, try tools like Think Automation or Autohotkey etc.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks all
The generic unhandled exception handler sounds OK, would that be on main, and what would the catch bit look like?
The generic unhandled exception handler sounds OK, would that be on main, and what would the catch bit look like?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.
I have recommended this question be closed as follows:
Split:
-- 'Chris Stanyon' (https:#a42868506)
-- 'Shaun Vermaak' (https:#a42867928)
If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.
seth2740
Experts-Exchange Cleanup Volunteer
I have recommended this question be closed as follows:
Split:
-- 'Chris Stanyon' (https:#a42868506)
-- 'Shaun Vermaak' (https:#a42867928)
If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.
seth2740
Experts-Exchange Cleanup Volunteer
Generally speaking, when writing an app, you will always have an Unhandled Exception handler of some sort. The whole purpose of that is to prevent the above error message. By the time your code reaches that handler, there's nothing you can really do to stop your app from closing, but you can at least handle it in a more meaningful way (friendly message to the user / info written to a log file / database connection closed etc.)
How you hook up an Unhandled Exception handler will depend on the dev tools you're using ( WPF / Winforms etc).