New Filter Exceptions expert in GExperts

FireWind

Свой
Регистрация
2 Дек 2005
Сообщения
1,957
Реакции
1,199
Credits
4,009
New Filter Exceptions expert in GExperts
2020-07-13 by dummzeuch
[SHOWTOGROUPS=4,20]
I my last GExperts related Для просмотра ссылки Войди или Зарегистрируйся I wrote about the new “Close Exception Notification” expert which I just had added to GExperts. It was a hack that hooked the Exception Notification dialog.

This spawned a Для просмотра ссылки Войди или Зарегистрируйся in the international Для просмотра ссылки Войди или Зарегистрируйся and resulted in a rewrite of the expert. It’s now called “Filter Exception” expert and instead of hooking the dialog it directly hooks into the code that shows this dialog. Thus it prevents the dialog from being shown for filtered exceptions.

I have to thank Для просмотра ссылки Войди или Зарегистрируйся of Для просмотра ссылки Войди или Зарегистрируйся fame for the detective work that lead to to this hooking code.

In that same discussion Для просмотра ссылки Войди или Зарегистрируйся suggested to add a project scope to the filtering. I have implemented that too.

So now the expert can filter on:
  • Project name, which is a regular expression.
  • Exception class
  • Exception message, which again is a regular expression
I have added all those exceptions that the Delphi IDE raises on every startup to my filter. It filters on the Project = “GExperts.*”, the exception classes and the messages it shows.

Для просмотра ссылки Войди или Зарегистрируйся

That means it will no longer annoy me with them while I am debugging GExperts but will still show them for other projects.

The filter details look like this:

Для просмотра ссылки Войди или Зарегистрируйся

Для просмотра ссылки Войди или Зарегистрируйся

It’s also possible to add a filter for the current debug session only, which means that it will be deleted automatically once the debug session ends.

Unfortunately hooking of the code is only available for Delphi 2005 and later. Older versions still have got to hook the Exception Notification dialog.

If you want to test this new functionality, you’ll have to Для просмотра ссылки Войди или Зарегистрируйся. Try it, it’s not rocket science!
[/SHOWTOGROUPS]