Hi again,
I was hoping someone here could help me out with something.
Say I have the following, extremely advanced and intricate script running
[pre]
try
{
try
{
try
{
[System.IO.File]::ReadAllText(‘c:\does\not\exist.txt’)
}
catch
{
Write-Host “Level 1.”
}
}
catch
{
Write-Host “Level 2.”
}
}
catch
{
Write-Host “Level 3.”
}
finally
{
Write-Host “It’s the end of the file as we know it. And I feel fine.”
}
[/pre]
Now, this performs as expected, but not as desired.
Is it possible to have it trickle down through all the layers of catch blocks? To be clear: I want it to fail. I just want to be able to compartmentalize things a little.
Thanks!