title: How do I raise a SILENT fatal exception delphi
body: <p>Situation:
  I have a list that is growing on hard drive and I want to load it in memory for processing. At some point, I will get EOutofMemory. What I need is a way to test the code that is in my except block:</p>
  
  <pre><code>implementation
  uses sysutils;
  function loadit(var F:File);
  begin
     Try
     {load list code}
     except
     on EOutofMemory do
        begin
        {error handling code to be tested}
        end;
     end; // the try block
  end;
  </code></pre>
  
  <p>What I need is a call to the exception block WITHOUT actually waiting for the out of memory condition to be met. I have looked at raise, and I've not found anything that would allow to raise an exception the way I need it.</p>
  
  <pre><code>raise EOutofMemory;
  </code></pre>
  
  <p>does not compile. </p>
  
  <pre><code>raise;
  </code></pre>
  
  <p>compiles but raises what? </p>
  
  <pre><code>raise EOutofMemory.NewInstance; 
  </code></pre>
  
  <p>compiles, but I wonder what it does with the object after? Will it be destroyed at the moment I leave the error handling block, stay behind in the heap or whatever the compiler decides to do with it?</p>
  
  <p>Assert does not allow to specify anything; anyway it's not its goal. </p>