New User

delphi package - automated exception handling
Post Reply
Lace
Posts: 4
Joined: Wed Feb 15, 2006 3:25 pm
Location: Manchester, UK

New User

Post by Lace »

Hi,

I am a new user of MadExcept

Already impressed, tracked and purged an apparently random from mu application!

Question 1.

How does one obtain a commercial licence, how much will that cost, are there any additional features available?

Quersion 2

My application is written in Delphi 7 usting Sybase as the underlying database.

The application as is handles errors as follows

1. There is an AppException routine which handles all untrapped exceptions, it operates as follows

a) If the connection to the database has been lost dispalyes the standard delhi exception dialog and closes the application

b) examines the sender object, if it is an input control (DBEdit or DBGrid)
determines if the error is an input error, eg. invalid date or number, if so formats some text to explain the problem and launches the standard exception dialog box with a user friendly error message

c) traps certain other errors and throws them away

d) if the sender object is a TControl prefixes the error message with the name of the object and where applicable its owner

e) displays an error dialog, two variants depending on where the error is a database error (formats the error message from the database) or some other type of error

f) writes the error message, the error type and id of the current user to an error log within the database.

Basically I would like to continue as now but be able to write just the following additional information to the database

Just the call stack for the main thread only for those lines which have a line number as in the following example

main thread ($dcc):
004d6c06 Psms.exe Forms TCustomForm.SetActiveControl
0072cf14 Psms.exe UnitNotes 6727 +15 TNotes.PageControlX5Change
00718a9d Psms.exe UnitNotes 1537 +98 TNotes.FormShow
007987a3 Psms.exe UnitMain 2029 +58 TMain.JvCaptionButton4Click
0079fe61 Psms.exe Psms 175 +77 initialization

preferably as follows

Forms TCustomForm.SetActiveControl
UnitNotes 6727 TNotes.PageControlX5Change
UnitNotes 1537 TNotes.FormShow
UnitMain 2029 TMain.JvCaptionButton4Click
Psms 175 initialization

Can I do this and if so how

Many thanks

Michael
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Re: New User

Post by madshi »

Lace wrote:How does one obtain a commercial licence, how much will that cost, are there any additional features available?
Here's the price list:

http://madshi.net/madExceptShop.htm

There are no additional features in the commercial edition. However, the text "non-commercial edition" is gone from the exception window. Plus you get the full source code of all madExcept units.
Lace wrote:Basically I would like to continue as now but be able to write just the following additional information to the database
Just the call stack for the main thread only for those lines which have a line number as in the following example
Well, you have to decide whether you want to let madExcept catch your exceptions or whether you want to do the hard work yourself. Probably madExcept can do it better, because it simply catches more exceptions than the normal Delphi exception handlers do. E.g. madExcept automatically catches all thread exceptions and initialization and finalization exceptions etc.

If you still decide that you want to handle the exceptions yourself, you can call "PauseMadExcept" in the intialization of your project. This will cause madExcept to not catch the exceptions for you, anymore.

If you decide to let madExcept do the exception catching for you, your current exception handler will not fire, anymore. Instead you can call RegisterExceptionHandler to be notified by madExcept about catched exceptions. In this exception handler you can do all the things you are already doing right now.

The madExcept settings allow you to tell madExcept that you want the callstack of the crashing thread, only, and not the callstack of all threads. Also you can turn off most of the other information madExcept normally collects. You can also tell madExcept to only show those stack items which have a line number. Just have a look at the madExcept settings dialog.
Post Reply