title: php session_start general error handling
body: <p>I'm looking for a general way to handle <code>session_start</code> errors, not a way to handle one specific error. There are numerous errors which can happen, such as the session directory being full, which cause a fatal error. I want a way to trap those errors and handle them cleanly, without having to write custom handlers for each possibility.</p>
  
  <p>Something like this (but not this as it doesn't work):</p>
  
  <pre><code>try{
      session_start();
  }catch(Exception  $e){
      echo $e-&gt;getMessage();
  }
  </code></pre>
  
  <p>All help appreciated, thanks in advance.</p>