title: Resume PHP to execution script after exception
body: <p>I have a php script lets say during execution the scripts throws an exception. I want my PHP to resume from where it left off (where it had thrown the exception).</p>
  
  <p>Should I put the same execution code in the "catch" part of the code?</p>
  
  <p>On example, is lets say connects to mySQL it fails for connection timed out</p>
  
  <pre><code>   function someCode(){
          $pdostmt = $this-&gt;prepare($this-&gt;sql);
          if($pdostmt-&gt;execute($this-&gt;bind) !== false) {
              if(preg_match("/^(" . implode("|", array("select", "describe", "pragma")) . ") /i", $this-&gt;sql))
                  return $pdostmt-&gt;fetchAll($this-&gt;fetchOption);
              elseif(preg_match("/^(" . implode("|", array("delete", "insert", "update")) . ") /i", $this-&gt;sql))
                  return $pdostmt-&gt;rowCount();
     }
     try {
          someCode();
          }   
      } catch (PDOException $e) {  
          //re-execute same code as within the try clause?
          someCode();
      }
  </code></pre>