RAD Studio (Common)
ContentsIndex
PreviousUpNext
E2125: EXCEPT or FINALLY expected (Delphi)

The compiler was expecting to find a FINALLY or EXCEPT keyword, during the processing of exception handling code, but did not find either.

program Produce;

begin
  try
  end;
end.

In the code above, the 'except' or 'finally' clause of the exception handling code is missing, so the compiler will issue an error.

program Solve;

begin
  try
  except
  end;
end.

By adding the missing clause, the compiler will be able to complete the compilation of the code. In this case, the 'except' clause will easily allow the program to finish.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!