title: powershell capture call stack after an error is thrown
body: <p>I want to do something like this...</p>
  
  <pre><code>try  
  {  
      # Something in this function throws an exception
      Backup-Server ...  
  }catch  
  {  
      # Capture stack trace of where the error was thrown from
      Log-Error $error 
  }
  </code></pre>
  
  <p>Ideally I'd like to capture arguments to the function and line numbers etc. (like you see in get-pscallstack)<br>
  EDIT: To clarify, it's the powershell stack trace I want not the .NET one<br>
  Any ideas how to achieve this?<br>
  Dave</p>