title: TryCatch not printing warning unless warning is wrapped in ()
body: <p>TryCatch is not printing the warnings unless the warning is wrapped in between brackets.</p>
  
  <pre><code>tryCatch(
    {
    print(wd)
  },
  error=function(e){
   (warning(sprintf('Watch out %s',e)))}
  )
  </code></pre>
  
  <p>prints the warning ""Watch out Error in print(wd): object 'wd' not found\n"</p>
  
  <p>but </p>
  
  <pre><code>tryCatch(
     {
   print(wd)
      },
      error=function(e){
       warning(sprintf('Watch out %s',e)) }
      )
  </code></pre>
  
  <p>does not. </p>
  
  <p>Any idea why? How can I fix this? This example is a minimal example. I have a much bigger function that runs through a loop and I don't necessarily want to stop the loop if there is an error but I want to see the warnings.</p>