title: php exceptions extra parameters
body: <p>Is it possible to add an extra parameter when throwing an exception?</p>
  
  <p>When I throw an exception I send along the error message but I would also like to send along the name of the field in a extra parameter. Something like:</p>
  
  <pre><code>throw new Exception('this is an error message', 'the field');
  </code></pre>
  
  <p>So when I display the message I can do something like this:</p>
  
  <pre><code>show_error($e-&gt;getFieldname, $e-&gt;getMessage());
  </code></pre>