Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Trap and Windows Forms

$
0
0

Hi, usually i have a  trap{} in my scripts to handle and log(!) allunforseen exceptions which i have not otherwise handled via Try/catch.

This works great.

But, when i have a script with windows forms, all exceptions will be displayed automatically as a system-popupand the code inside trap{} is not executed, so the error never gets logged.

 

Why is the trap being ignored?

And how do i make my form execute the trap in case of an exception?

Thanks, Rob 

http://www.administrator.de/


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>