I have the below function that iterates over a list of workers, invoking their DoStuff() method. If the first worker fails, I try the next one until I'm out of workers. If they all fail, I re-throw the last exception.

```
// workers is an IList<>.
public object TryDoStuff()
{
    for (int i = 0; i < workers.Count; i++)
    {
        try
        {
            return worker[i].DoStuff();
        }
        catch
        {
            if (i == workers.Count - 1)
            {
                throw; // This preserves the stack trace
            }
            else
            {
                continue; // Try the next worker
            }
        }
    }
}

```

When compiling, I get an error that "not all code paths return a value" for this function. Although I can silence the error by adding an explicit return after the for loop, I'm doubting the compiler is accurate here as I don't see how the for loop will be escaped without either returning or re-throwing an exception. And if an exception is re-thrown, not returning a value is valid.

What am I missing? Is csc unable to reason about the conditional in the catch block?