Delphi Exception handling code review reminders


I bumped into [WayBack]When an exception is nil in the exception handler – twm’s blog for some legacy code a while ago.
Some code review reminders:

raise Exception( is always wrong: no exception instance is created
Exception.Create( without a raise is wrong most of the times
except end is almost always wrong
except and finally in encompassing blocks often is a code smell

I need to check which ones are caught by [WayBack] Code Analysis Tool | FixInsight for Delphi (which is not at [WayBack] TMS Software | VCL, FMX, ASP.NET, .NET controls & components for Delphi, C++Builder & Visual Studio | TMS FixInsight Pro.)

Comments are closed.