madExcept and TMS stringgrid

delphi package - automated exception handling
Post Reply
norjournal
Posts: 1
Joined: Thu Jan 04, 2018 2:05 pm

madExcept and TMS stringgrid

Post by norjournal »

Hello,
is there a setting in madexcept to avoid showing gracefully handled exceptions?

I guess maybe I could use the exception class filter to ignore the tms unit?

This is what TMS software answered me today to check after I asked about grid column sorting and a MadExcept issue I have:

"Hello,
does anyone have a tip on how to avoid MadExcept econverterrrors when the user sorts a TMS grid column containing a date and some extra text after the date? A typical exception message logged is '04.01.2018 dentistappointment' is not a valid date and time.

Could I maybe solve it by adding some extra special characters between the date and the text in the column so TMS doesn't trigger econverterrrors like that? I would like to still show both a date and some extra text in the same column like I am doing today, and allow the users to sort the column if they want to do that.

I use madexcept to log all exceptions in the project, but right now 75% or more of the logs are from this issue when the user sorts columns like this in the TMS grids, it's not really something we want to log as an exception."

This is the answer I got:
1) You could force that the sort format is alphabetic only for example by implementing the OnGetFormat event and return ssAlphabetic
2) Without madexcept, normally you should not see these exceptions when running your app outside the IDE as these exceptions are all gracefully handled at TAdvStringGrid level. If there is a setting in madexcept to avoid showing gracefully handled exceptions, please set this. (I am not familiar enough with the madexcept tool to know about such settings)
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: madExcept and TMS stringgrid

Post by madshi »

madExcept by default ignores all gracefully handled exceptions. Are you using RegisterHiddenExceptionHandler()?

What happens if you disable madExcept completely? Are those exceptions really totally invisible? Or maybe you get a simple MessageBox instead? I would not count that as "gracefully handled", though. The VCL has a global exception handler in the message loop which does something like a "MessageBox(Exception.Message)", and then continues execution. Maybe the TMS StringGrid relies on this behaviour and expects exceptions to be shown to the user like this, as a simple MessageBox(Exception.Message)?
Post Reply