Is there a way to temporarily turn off exception dialogs in the Delphi 5 IDE without implementing an own exception handler? [duplicate]

StackOverflow https://stackoverflow.com/questions/15890991

  •  02-04-2022
  •  | 
  •  

Question

I've got a very old Delphi 5 project where a bug needs to be fixed.

It loads all right into the Delphi 5 IDE, but on execution I get a lot of Indy Exceptions that ARE handled correctly by the program like "connection closed gracefully". These are not a part of the bug I'm trying to fix, but since I get exception dialogs displayed again and again it's an unbelievable pain to debug the app.

Is there a way to temporarily turn off exception dialogs in the Delphi 5 IDE without implementing an own exception handler? It would be especially helpful when only some specific exception dialogs like "connection closed gracefully" are not displayed.

Était-ce utile?

La solution

In the debugger settings there is an option 'break on language exceptions'. Turn it OFF (uncheck). You can do this anytime, even in the middle of a debugging session.

If that option is switched on, the debugger will break immediately when exceptions are raised, even if the code subsequently handles them. This is sometimes important in debugging. But it can also be annoying if you're not interested in seeing all those exceptions, such as in your case.

You can also leave 'break on language exceptions' checked, but add the exception types that you don't want to break on, to the list of excluded exception types there in that dialog. I rarely use that option but sometimes it can also be helpful.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top