в PowerShell, при определенных условиях, я могу это сделать:поймать PowerShell [System.Management.Automation.MethodException] ошибка
throw [System.Management.Automation.MethodException]
позже я поймать так:
catch [System.Management.Automation.MethodException]
{
catch
{
Мой код падает во второй (общий) улов. , когда я смотрю на $ _. Исключение во втором улове: «System.Management.Automation.MethodException» - так почему Powershell не поймает его в первом улове? Как я могу это исправить?
Спасибо, Питер
'бросить [System.Management.Automation. MethodException] '->' throw [System.Management.Automation.MethodException] :: new() ' – PetSerAl