madExcept does not work with FastReport

delphi package - automated exception handling
Post Reply
edwinyzh
Posts: 40
Joined: Sat Jun 29, 2013 8:23 am

madExcept does not work with FastReport

Post by edwinyzh »

Hi,

I've madExcept enabled for my project, it works anywhere except that when FastReport shows an error, madExcept doesn't show the stacktrace which is what I need the most.

I asked the FastReport team and they can't provide such support, so I resort to this forum.

Thanks.
edwinyzh
Posts: 40
Joined: Sat Jun 29, 2013 8:23 am

Re: madExcept does not work with FastReport

Post by edwinyzh »

Hi I'm a registered user and my (Share-it order no. 446807335)

All I need is to have madExcept hook into FastReport so that it catches exceptions raised inside FR. Anybody can help? Thanks.
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: madExcept does not work with FastReport

Post by madshi »

Does FastReport provide any sort of exception callback? If so, just call "madExcept.HandleException()" in that callback and you're done.

Otherwise you can use madExcept's RegisterHiddenExceptionHandler(stDontSync) to register an exception handler which gets called for exceptions that are silently handled by FastReport (or other parts of the application). You can then in your handler simply set "handled := false" to force madExcept to show a bug report for such hidden/handled exceptions. By default madExcept only cares about unhandled exceptions.

Hope that helps?
edwinyzh
Posts: 40
Joined: Sat Jun 29, 2013 8:23 am

Re: madExcept does not work with FastReport

Post by edwinyzh »

Code: Select all

RegisterHiddenExceptionHandler(stDontSync)
works, thanks!
Post Reply