title: Try/Except/Finally not working properly in Delphi XE
body: <p>I'm having this funny issue with Delphi XE where I create a try/except/finally statement and when the application generate an exception the except block is never called it jump straight to the finally block, I tried few things like invert the try/except/finally to try/finally/except, try to change the try blocks to different places, clean the code and recompile in case was a Delphi issue but noting seems to work.</p>
  
  <p>What I'm trying to accomplish here is to show a dialog message to the user and after clean up the code in case of a crash.</p>
  
  <pre><code>procedure CallbackExport(Sender: TObject);
  var
    SaveDlg: TSaveDialog;
    FileName: string;
  begin
    SaveDlg := TSaveDialog.Create (nil);
    try
      try
        SaveDlg.Title := 'Export';
        SaveDlg.InitialDir := GetSystemPath(CSIDL_DESKTOP);
        SaveDlg.Options := [ofOverwritePrompt, ofEnableSizing];
  
        case (Sender as TMenuItem).Tag of
          cnExcel: begin
            SaveDlg.Filter := 'Excel File (*.xls)|*.xls';
          end;
          cnHtml: begin
            SaveDlg.Filter := 'HTML File (*.html)|*.html';
          end;
          cnTxt: begin
            SaveDlg.Filter := 'Text File (*.txt)|*.txt';
          end;
          cnCsv: begin
            SaveDlg.Filter := 'Comma Seperated File (*.csv)';
          end;
          cnXml: begin
            SaveDlg.Filter := 'XML file (*.xml)|*.xml';
          end;
        end;
        if not SaveDlg.Execute(self.Handle) then
          Exit;
        FileName := SaveDlg.FileName;
  
        case (Sender as TMenuItem).Tag of
          cnExcel: begin
            ExportGridToExcel(FileName, tvdGrid);
          end;
          cnHtml: begin
            ExportGridToHTML(FileName, tvdGrid);
          end;
          cnTxt: begin
            ExportGridToText(FileName, tvdGrid);
          end;
          cnCsv: begin
            ExportGridToText(FileName, tvdGrid, true, true, ',', '', '', 'CSV');
          end;
          cnXml: begin
            ExportGridToXML(FileName, tvdGrid);
          end;
        end;
      except
        on e: exception do
        begin
          ShowMessage('An error occurred while saving the file ' + FileName + #13#10 + 'With a message: ' + E.Message);
          StvdAudit.tvdAudit('Error saving file, reason: ' + E.Message);
        end;
      end;
    finally
      SaveDlg.Free;
    end;
  end
  </code></pre>