Monday, February 20, 2017

PSThar - All the output streams

People make mistakes and scripts encounter errors, and previously there was no convenient way to get the errors out of a PSThar script. If something bad happened, you'd probably get no output and you'd need to run $error to see what the problem is.

So today, I added a dropdown in the lower left that lets you choose which output you'd like to see in the results pane: normal output, errors, warnings, information, or verbosity. At the completion of a script, the view is automatically moved to the first of those that actually has anything to say.

I also noticed today that entering invalid syntax caused the window to stay as if a script was executing, except that the Stop Script button did nothing. The problem was that syntax errors throw an exception in the Invoke call, which killed the thread that was supposed to compute and report the results. Those exceptions are now caught and handled appropriately.

No comments:

Post a Comment