tag:blogger.com,1999:blog-8832291873344926372.post101177324737141134..comments2024-03-24T14:03:17.111-04:00Comments on Cape Cod Gunny - Michael Riley: Delphi Tip of the Day - First Chance ExceptionMichael Rileyhttp://www.blogger.com/profile/15959746627356186242noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-8832291873344926372.post-19395521919208901622020-04-20T08:33:53.180-04:002020-04-20T08:33:53.180-04:00So true Xepol! I'm working on a large scale a...So true Xepol! I'm working on a large scale app carefully reducing these auto-created references until I reach just the main form...and there were hundreds when I started. Only 45 to go... First attempts to replace all with singleton functions just to get them under control resulted in AVs everywhere due to the shear amount of interdependencies. One of my first steps in setting up a new Delphi install, disable that auto-create.Anonymoushttps://www.blogger.com/profile/12376047914742697607noreply@blogger.comtag:blogger.com,1999:blog-8832291873344926372.post-65276275623595602862020-04-16T07:02:33.559-04:002020-04-16T07:02:33.559-04:00Amen.Amen.Andreas Tothhttps://www.blogger.com/profile/10680118333393523148noreply@blogger.comtag:blogger.com,1999:blog-8832291873344926372.post-5957727797581152552020-04-16T01:14:29.955-04:002020-04-16T01:14:29.955-04:00Never let the IDE auto create anythiong for you ex...Never let the IDE auto create anythiong for you except the primary form. Everything else create yourself (and destroy when you no longer need it) and DEFINITELY avoid those global references. While it is handy for novices, it also means they never really understand what is going on and why things late on go so badly when they try more advanced things.<br />Xepolhttps://www.blogger.com/profile/07501635065767343244noreply@blogger.comtag:blogger.com,1999:blog-8832291873344926372.post-5520144312278138152020-04-15T22:09:10.383-04:002020-04-15T22:09:10.383-04:00When an exception is thrown at runtime, it happens...When an exception is thrown at runtime, it happens in 2 stages. The exception is first given to an attached debugger, if any, to allow the debugger a "first chance" at processing the exception before your code EVER sees it. Sometimes exceptions can be resolved by the debugger itself. But if a debugger does not discard the exception, only then is it passed back to your code for normal handling (so that a catch() block in your code can, you know, catch the exception).Remy Lebeauhttps://www.blogger.com/profile/04615972347531819074noreply@blogger.com