title: Exception not caught on PHP5.6 server
body: <p>I am a bit stuck with an web-app I currently develop. I decided to <strong>use Exceptions together with try/catch-blocks</strong> more deliberately.</p>
  
  <p>Nonetheless; I developed <strong>locally using PHP7</strong>, and when I just uploaded the app to a <strong>PHP5 server</strong>, all those exceptions are not catched any longer. Instead, script execution stops with a fatal error. I have read something about major changes concerning Exceptions with PHP7, but all information I found is very vague.</p>
  
  <p>Script-stop is not so much a problem, but catching and "modifying" the error is VERY important in this case, since the script is run by AJAX call and must return an JSON-formatted error-message.</p>
  
  <p><strong>Main File:</strong></p>
  
  <pre><code>try {
  
      if (!$this-&gt;validateNonce($this-&gt;postParams['upload-nonce']))
      throw new Exception('Upload failed because nonce could not be verified.');
  
      new FloImage(
          $this-&gt;postParams['basename'],
          true,
          $this-&gt;fileParams['uploadfile']
      );
  
  } catch (Throwable $e) {
  
      echo json_encode(array('error' =&gt; $e-&gt;getMessage()));
      die();
  
  }
  </code></pre>
  
  <p><code>FloImage()</code> checks some information (name, file-size, etc.) and in case of an error throws an exception this way:</p>
  
  <pre><code>throw new Exception(_('My error message.'));
  </code></pre>
  
  <p>Help about how to make the try-catch-block work with PHP5 would be appreciated! Thank you in advance...</p>