Quantcast
Channel: PowerShell General
Viewing all articles
Browse latest Browse all 10624

Error Catching and Exceptions

$
0
0

All,

Why doesn't my catch block catch this error?

"Get-ChildItem : Cannot find path '\\docvfs01\pre_dev$\' because it does not exi
st."

I have tried catch as } catch {......} and } catch [EXCEPTION] {.......}

I do get it in $error but this seems to defeat the purpose of catch to interrupt code flow.

Thank you   --Goo


Viewing all articles
Browse latest Browse all 10624

Trending Articles