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

Popular posts from this blog

some help on Event 540

WMI Repository 4GB limit - Win 2003 Ent Question

Event ID 1302 (error 1307) DFS replication service encountered an error while writing to the debug log file