title: file_get_contents good way to handle errors
body: <p>I am trying to error handle the file_get_contents method so even if the user enters an incorrect website it will echo an error message rather then the unprofessional</p>
  
  <blockquote>
    <p>Warning: file_get_contents(sidiowdiowjdiso): failed to open stream:
    No such file or directory in C:\xampp\htdocs\test.php on line 6</p>
  </blockquote>
  
  <p>I thought if i make a try and catch it will be able to catch the error but that did not work.</p>
  
  <pre><code>try  
  {  
  $json = file_get_contents("sidiowdiowjdiso", true); //getting the file content
  }  
  catch (Exception $e)  
  {  
   throw new Exception( 'Something really gone wrong', 0, $e);  
  }  
  </code></pre>