I installed madexception in Delphi XE6 in order to find out why I get 'Access violation..' errors in my program. In my code I also have 'raise exception.Create(<my message>)' in order to inform the user about invalid actions. I realised that madexcept dialog appears not only for exceptions caused problematic code but also with my own created exceptions. I wonder if I there is a way to disallow my own created exceptions to use madexcept dialog to appear.
Thank you very much in advance
User and System exceptions
Re: User and System exceptions
Have you simply used "Exception" or a custom exception class? If you had your own exception class, you could filter by class here:
http://help.madshi.net/madExceptSettings3.htm
You can add the class there after "EDBEditError" (comma separated, IIRC). If you're simply using "raise Exception.", maybe you can do a search and replace through your whole code to replace "raise Exception." with "raise WhateverException."?
http://help.madshi.net/madExceptSettings3.htm
You can add the class there after "EDBEditError" (comma separated, IIRC). If you're simply using "raise Exception.", maybe you can do a search and replace through your whole code to replace "raise Exception." with "raise WhateverException."?
-
- Posts: 4
- Joined: Tue Mar 22, 2016 11:19 am
Re: User and System exceptions
I used
type MyException = class (Exception);
inside my code I use raise MyException.Create(<my own message'>
and I set the madexcept Exception filter as follows:
Classes : EDBEditError, MyException
Don't create a bug report (checked)
Don't create a screen shots (checked)
Don't pause the running threads (checked)
Don't call the exception handlers (checked)
and show a simple message box
when i run the program and i cause myexception to occur the full exception box appears with bug report , screen hots etc buttons active.
I wonder what I did wrong
Thank you
type MyException = class (Exception);
inside my code I use raise MyException.Create(<my own message'>
and I set the madexcept Exception filter as follows:
Classes : EDBEditError, MyException
Don't create a bug report (checked)
Don't create a screen shots (checked)
Don't pause the running threads (checked)
Don't call the exception handlers (checked)
and show a simple message box
when i run the program and i cause myexception to occur the full exception box appears with bug report , screen hots etc buttons active.
I wonder what I did wrong
Thank you
Re: User and System exceptions
I've just tested it with:
And it works for me here. Can you reproduce this problem in a simple test project?
Code: Select all
type MyException = class (Exception);
begin
raise MyException.Create('test');
-
- Posts: 4
- Joined: Tue Mar 22, 2016 11:19 am
Re: User and System exceptions
Sorry I found my mistake.
Thank you very much for your quick response
Thank you very much for your quick response