title: When should I use Write-Error vs. Throw? Terminating vs. non-terminating errors
body: <p>Looking at a Get-WebFile script over on PoshCode, <a href="http://poshcode.org/3226" rel="noreferrer">http://poshcode.org/3226</a>, I noticed this strange-to-me contraption:</p>
  
  <pre><code>$URL_Format_Error = [string]"..."
  Write-Error $URL_Format_Error
  return
  </code></pre>
  
  <p>What is the reason for this as opposed to the following?</p>
  
  <pre><code>$URL_Format_Error = [string]"..."
  Throw $URL_Format_Error
  </code></pre>
  
  <p>Or even better:</p>
  
  <pre><code>$URL_Format_Error = New-Object System.FormatException "..."
  Throw $URL_Format_Error
  </code></pre>
  
  <p>As I understand, you should use Write-Error for non-terminating errors, and Throw for terminating errors, so it seems to me that you should not use Write-Error followed by Return. Is there a difference?</p>