Aşağıdaki kod var, hata oluştuğunda, hatanın ilk önce b işlevinde gerçekleştiğini ve sonra işlev a'da olduğunu görmek istiyorum. Ama aslında sadece işlevi defalarca denilebilir çünkü hata, işlev a gerçekleşmesi Bir sorunpowershell: hata oluştuğunda toplam çağrı yığınlarını nasıl yazdırılır?
cls
function a{
Remove-Item "not-exist-item"
}
function b{
a
}
b
Remove-Item : Cannot find path 'C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\not-exis t-item' because it does not exist. At C:\Users\Daniel.Wu\AppData\Local\Temp\2\a.ps1:***3 char:14*** + Remove-Item <<<< "not-exist-item" + CategoryInfo : ObjectNotFound: (C:\Program File...\not-exist-item:String) [Remove-Item], ItemNotFoundException + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand