title: R - `try` in conjunction with capturing ALL console output?
body: <p>Here's a piece of code I'm working with:</p>
  
  <pre><code>install.package('BiocManager');BiocManager::install('UniProt.ws')
  requireNamespace('UniProt.ws')
  uniprot_object &lt;- UniProt.ws::UniProt.ws(
    UniProt.ws::availableUniprotSpecies(
      pattern = '^Homo sapiens$')$`taxon ID`)
  query_results &lt;- try(
      UniProt.ws::select(
        x = uniprot_object,
        keys = 'BAA08084.1',
        keytype = 'EMBL/GENBANK/DDBJ',
        columns = c('ENSEMBL','UNIPROTKB')))
  </code></pre>
  
  <p>This particular key/keytype combination is non-productive and produces the following output:</p>
  
  <pre><code>Getting mapping data for BAA08084.1 ... and ACC
  error while trying to retrieve data in chunk 1:
    no lines available in input
  continuing to try
  Error in `colnames&lt;-`(`*tmp*`, value = `*vtmp*`) : 
    attempt to set 'colnames' on an object with less than two dimensions
  </code></pre>
  
  <p>Of the two <code>[eE]rror</code>s reported only the second is a 'proper' <code>R</code> error object and given the use of <code>try</code> accordingly captured in the variable <code>query_result</code>.</p>
  
  <p>I am, however, desperate to capture the other <code>error</code> bit (<code>no lines available in input</code>) to inform downstream programmatic processes.</p>
  
  <p>After playing with a plethora of <code>capture.output</code>, <code>sink</code>, <code>purrr::quietly</code>, etc. options found by startpaging (googling), I continue to fail capturing that bit. How can I do that?</p>