title: Throw Exception to Next Catch Block
body: <p>I want to catch a custom exception, do some logic on it, and if it fails, throw it to a more generic catch block. Like so:</p>
  
  <pre><code>class My_Exception extends Exception {
      protected $_nonFatal = false;
  
      public function __construct($value, $nonFatal = false) {
          $this-&gt;_nonFatal = (bool)$nonFatal;
  
          return parent::__construct($value);
      }
  
      public function isNonFatal() {
          return (bool)$this-&gt;_nonFatal;
      }
  }
  
  try {
  
  } catch (My_Exception $e) {
      if ($e-&gt;isNonFatal) {
          // #1
          // Err gently
      }
  
      // #2
      // The error was fatal, so keep throwing it
      throw new Exception($e-&gt;getMessage());
  
  } catch (Exception $e) {
      // #3
      echo 'An exception was caught with the message '.$e-&gt;getMessage();
  }
  </code></pre>
  
  <p>So I catch <code>My_Exception</code>, check to see if it's a non-fatal error. If so, err gently, (section #1). If not (section #2), I want the second catch to be triggered, (section #3.) Instead, the <code>throw new Exception</code> in section #2 leaves the <code>try/catch/catch</code> all together.</p>
  
  <p>I could use a switch statement on the class of <code>$e</code> but I think that's messier. Is there a standard way to do this that I'm missing?</p>