Do I need to try/catch on opendir in PHP due to E_WARNING?
<p>I'm making a little file browser for homework - and I have it working as well as I need to, but I'm a little confused on handling error scenarios in PHP now that I'm trying to refactor my coding.</p>

<p>I'm used to C++/C# try/catch error handling, which PHP seems to have some variant of.  What's confusing me is this:</p>

<blockquote>
  <p><strong>resource opendir ( string $path [, resource $context ] )</strong></p>
  
  <p>Returns a directory handle resource on success, or FALSE on failure.</p>
  
  <p>If path is not a valid directory or the directory can not be opened
  due to permission restrictions or filesystem errors, opendir() returns
  FALSE and generates a PHP error of level E_WARNING. You can suppress
  the error output of opendir() by prepending '@' to the front of the
  function name.</p>
</blockquote>

<p>from <a href="http://php.net/manual/en/function.opendir.php" rel="nofollow">http://php.net/manual/en/function.opendir.php</a>.</p>

<p>Do I need to catch the generated PHP error of level E_WARNING mentioned there, or is it silly to? I don't understand why it would return false and throw an error - shouldn't the error throwing make it so you don't return normally anyway?</p>
