php exceptions extra parameters
<p>Is it possible to add an extra parameter when trowing an exception?</p>

<p>When i trow 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>
