title: Yii 1.1 with PHP 5.6: how to skip Redis connection error silently
body: <p>I am reading some extra information from Redis and the desired behaviour is to skip connection error silently, if any:</p>
  
  <pre><code>try {
      $r = new Redis();
      $r-&gt;connect("127.0.0.1", "6379");
  } catch (Error $e) {
      ;
  } catch (Throwable $e) {
      ;
  }
  </code></pre>
  
  <p>If Redis fails, monitoring system will show alert to right people to fix it.</p>
  
  <p>Unfortunatelly the code above still causes Yii to fail and produce HTTP 500:</p>
  
  <pre><code>2018/04/09 12:28:04 [error] [php] Redis::connect(): connect() failed: Connection refused
  </code></pre>
  
  <p>What am I doing wrong?</p>