Delphi Exception handling code review reminders
Posted by jpluimers on 2020/06/18
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 createdException.Create(without araiseis wrong most of the timesexcept endis almost always wrongexceptandfinallyin 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 now at [WayBack] TMS Software | VCL, FMX, ASP.NET, .NET controls & components for Delphi, C++Builder & Visual Studio | TMS FixInsight Pro.)
--jeroen






Leave a comment