exception handler
hi, using try-catch-finally in main powershell script. have separate module script have few functions created. each function in module script has it's own try-catch-finally block. question is, if calling outside function has try-catch-finally disable try-catch-finally block have initiated in main script?
not best person answer this, observations
the exception caught inner block.
one way able pass outside loop throwing again, dont know myself if thing do.
try{
try{calc2.exe}
catch{write-host $_ -fore green
#throw $_
}
}catch{write-host $_ -fore red}
maybe else have more add.
sumesh p.
Windows Server > Windows PowerShell
Comments
Post a Comment