in powershell, under certain condition , i do this :
throw [System.Management.Automation.MethodException]
later i have catch like this :
catch [System.Management.Automation.MethodException]
{
catch
{
My code falls into the second (general) catch. when i look at $_.Exception in the second catch, it says 'System.Management.Automation.MethodException' - so why come Powershell does not catch it in the first catch ? How can i fix this?
Thanks, Peter