title: How to catch an Exception in a TDataModule.OnCreate event?
body: <p>I encountered the following issue in Delphi with a <code>try/except</code> block.</p>
  
  <p>I have a simple application - one MainForm named <code>fr_MAIN</code> and one <code>TDataModule</code> named <code>DM</code>. <code>DM</code> is not auto-created, but it is created at run-time in <code>fr_MAIN</code>'s <code>Button2.OnClick</code> event:</p>
  
  <pre><code>procedure Tfr_MAIN.Button2Click(Sender: TObject);
  begin
    try
      DM := TDM.Create(nil);
      Showmessage('DM started!');
    except
      on E:Exception do
      begin
        Showmessage('DM not started!');
      end;
    end;
  </code></pre>
  
  <p><code>DM</code> has some code in its <code>OnCreate</code> event:</p>
  
  <pre><code>procedure TDM.DataModuleCreate(Sender: TObject);
  begin
    raise Exception.Create('this is error!');
    // DM code here ...
  end;
  </code></pre>
  
  <p>The problem is that when I click on <code>Button2</code>, I receive the <code>'this is error!'</code> exception message, the rest of the <code>DM code here</code> does not run - which is correct! But then I also receive the <code>'DM started!'</code> message instead of the <code>'DM not started!'</code> message. </p>
  
  <p>The exception raised by <code>DM</code> interrupts the action, but is not caught in the <code>except</code> block of the form!</p>
  
  <p>Why is this?</p>