title: Return, inside or outside Try / catch?
body: <p>In the below code, the IDE alerts me about "Missing return statement" in the last bracket. Which leads me to ask here if the return inside the <code>try{}</code> is ok or should be outside it.</p>
  
  <p>Thanks a lot.</p>
  
  <pre><code>public function getFileNamesFromKeywords( array $ids, $format ) {
      try {
        if(self::$dbLink) {
          $ids = implode(',',$ids);
          $query = 'SELECT d.id, d.wfid, d.docid , k.keyword, k.value'.
            'FROM keywords k'.
            'INNER JOIN documents d '.
            'ON k.document_id = d.id'.
            'WHERE k.document_id IN ('.$ids.')';
          $results = self::$dbLink-&gt;query($query);
  
          if( $results === false ) {
            throw new Exception('Ocurrió un error al consultar a la DB.', 500);
          }
          $results = $results-&gt;fetchAll(PDO::FETCH_ASSOC);
          $filenames = $this-&gt;buildFileNames( $results, $ids, $format );
        }
        else {
          throw new Exception('No hay una conexión establecida con la DB.', 500);
        }
        return $filenames;
      }
      catch(Exception $e) {
        $this-&gt;error = 'Error al intentar conectar con la BD: ' . $e-&gt;getMessage();
      }
    } //&lt;----- Missing return statement
  </code></pre>