PriorException was unhandled by user code
<p>I have multiple nested methods with try/catch blocks.  If there are any exceptions I want to log the first one and have the flow of control bubble up through the nested methods.  I tried to do this by raising a custom exception called PriorException ...</p>

<pre><code>public class PriorException : ApplicationException
{
    public PriorException() : base() { }
    public PriorException(string message) : base(message) { }
}
</code></pre>

<p>... and writing the catch blocks like so:</p>

<pre><code>try
{
    (do stuff here)
}
catch (Exception ex)
{
    MyLog.ExceptionError(ex);
    if (ex is PriorException) { throw; } else { throw new PriorException(); }
}
</code></pre>

<p>(MyLog ignores PriorException, and the outermost catch block does NOT rethrow.)</p>

<p>However, what is happening is that when an exception is encountered it is caught, logged, and a PriorException is thrown.  Then control falls out to the calling method where PriorException is caught and rethrown.  But then control moves to the open braces of the else clause of the catch block and the program crashes with "PriorException was unhandled by user code".</p>

<p>I'm still inside one or more nested try/catch blocks which should catch this exception, plus I have AppDomain.CurrentDomain.UnhandledException wired up for good measure.  So what's going on?</p>
