I am trying to use cleartool command in powershell.
If the command fails, it should catch the exception and do the action. But it was not caught by catch {}
try {
#If $viewname not exist it will throw error
cleartool lsview $ViewName
}
catch {
# If list view fails , it means View doesn't exist. So create view
Write-host "Create view"
cleartool mkview -tag $ViewName -nsh $ccViews$ViewName".vws"
}
When commands in try fails , it doesn't invoke expressions in catch.
Whether catch command won't work with non .net related stuff?