I've got a small example of exception trapping that doesn't seem to be
working right, or at least how I would expect it to work:
'caught general exception: ' + $_.Exception.Message
'caught Win32 exception'
# re-throw exception
# throw a non-win32 exception
When you invoke the Test function, none of the trap handlers get invoked.
Shouldn't the general trap handler get invoked in this case? It seems to be
the type-specific trap handler within the function that is causing the outer
trap handler to get ignored. If you remove the type from the function's
exception trap, then the outer exception trap will then work.
Is this right? Shouldn't I be able to catch a specific exception type and
allow all others to propogate to other handlers?