[SOLVED] Exception not Handled lazarus / 62-General ---------------------------------------------------------------------- BenLaz · 2014-08-15 12:55 Hello, I've a strange comportment easily reproductible : that code doesn't catch the exception and the application stop working var   r1 : Real; begin   try     r1 := r1 / 0;   except     Beep;   end; end.    Does any one have any idea ? Ps : I use FPC 2.6.4 and Lazarus from svn trunc ---------------------------------------------------------------------- marcov · 2014-08-15 13:00 Make sure you  USES sysutils. ---------------------------------------------------------------------- BenLaz · 2014-08-15 13:05 It's the case either in my program and in the simple test program i made. Here it is : program Bug; {$mode objfpc}{$H+} uses   {$IFDEF UNIX}{$IFDEF UseCThreads}   cthreads,   {$ENDIF}{$ENDIF}   Classes, sysutils; var   r1 : Real; begin   r1 := 1;   try     r1 := r1 / 0;   except     Beep;   end; end. ---------------------------------------------------------------------- ChrisF · 2014-08-15 14:21 I guess you're trying to run your program inside the Lazarus IDE, aren't you ? If it's the case, the most simple way to correct it is to run your program outside the IDE. There are already some posts about this behavior (i.e. exceptions handling when running inside or outside the IDE ) in this forum. ** Edit ** One of these discussions: http://forum.lazarus.freepascal.org/index.php/topic,24743.0.html . ---------------------------------------------------------------------- BenLaz · 2014-08-15 14:29 Thank you very much for your answer, You're right, when running outside of the debugger it just works fine.