title: Memory exception while XDocument.Save()
body: <p>I am trying to save an XDcoument to a thumb drive which doesnt have enough memory space available. (This is a special test condition for the app) Though the application is giving an exception like below, I cant get that in the try catch block around the XDocument.Save(filePath). Looks like it is a delayed throw. Is it a LINQ issue or am I doing something wrong?.</p>
  
  <p><a href="http://img211.imageshack.us/img211/8324/exce.png" rel="nofollow noreferrer">alt text http://img211.imageshack.us/img211/8324/exce.png</a></p>
  
  <pre><code> System.IO.IOException was unhandled
   Message="There is not enough space on the disk.\r\n"
   Source="mscorlib"
   StackTrace:
     at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
     at System.IO.FileStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count)
     at System.IO.FileStream.FlushWrite(Boolean calledFromFinalizer)
     at System.IO.FileStream.Dispose(Boolean disposing)
     at System.IO.FileStream.Finalize()
  </code></pre>