How are exceptions handled in PHP?
<p>Can anybody tell me how are exceptions handled in PHP? I have this code</p>

<pre><code>try{
   $this-&gt;b-&gt;methodthatraisesexception();
}
catch(Exception $ex){
  echo "Hi Hi hi, you tried to deleted a non existing file";
}
</code></pre>

<p>When i try to run this code instead of seeing the <code>echo</code> message, i see some kind of weird <code>PHP error occured</code> message. Btw, the above method is contained in <code>A</code>'s class which handles exceptions. It is calling to <code>b</code>'s method which generates error but doesn't have <code>try catch</code>. I see the below given error. Instead of my own <code>echo</code> statement. Please let me know if anything is unclear.</p>

<p><strong>EDIT</strong></p>

<pre><code>A PHP Error was encountered

Severity: Warning

Message: unlink(C:/Program Files/wamp/www/\College\uploads\4c4b29de80e39.jpg) [function.unlink]: No such file or directory

Filename: models/settings.php

Line Number: 31
</code></pre>

<p>Thanks in advance :)</p>
