Reduce the reliance on exceptions for control flow; add helper to find exceptions