title: Laravel 4 - Catch errors
body: <p>It seems like its not possible to catch errors yourself, insted of getting the laravel 4 error output.</p>
  
  <p>For example if i try:</p>
  
  <pre><code>    $databaseConfig = Config::get('database.connections.mysql');
      $connect = mysql_connect($databaseConfig['host'], $databaseConfig['username'], $databaseConfig['password']);
      if (!$connect)
      {
          return 'error';
      }
  </code></pre>
  
  <p>If a error occurs i won't get the "error", insted laravel shows me the exception (on that orange site).</p>
  
  <p>The same if you go ahead and try a</p>
  
  <pre><code>try {
      $pdo = DB::connection('mysql')-&gt;getPdo();
  }
      catch(PDOException $exception) {
      return Response::make('Database error! ' . $exception-&gt;getCode());
  }
  </code></pre>
  
  <p>Is there any way to do that?</p>