raise an exception without activating madExcept

delphi package - automated exception handling
Post Reply
taoh
Posts: 1
Joined: Sat Oct 08, 2005 6:27 pm

raise an exception without activating madExcept

Post by taoh »

In a db application I am validating field values in the beforepost event.

The only way I know of cancelling the post is to raise an exception to inform the user that the data is wrong.

I would like to stop madExcept before this and restart it after a successful post.

Can this be done?

If not is there a better way of cancelling a dataset event?

cheers
taoh
madshi
Site Admin
Posts: 10338
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Just use a specific self defined exception class and tell madExcept to ignore this specific class. That should do the job for you. If you are using madExcept 3, you can do the filtering on the "exception filter" tab of the madExcept settings dialog.
Post Reply