Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM Client/Server » View Thread |
Messages 1 to 4 of 4 total |
My madExcept Exception Handler for DBISAM C/S Connection Errors |
Wed, Jul 19 2006 11:08 AM | Permanent Link |
"Johnnie Norsworthy" | Just finished writing this for my applications using DBISAM client/server. I
thought I'd share it. I add some globals to my program in their own unit "Bug.pas" BugOffice: String; // my customer's office name BugName: String // the user logged into my program // a program location marker - handy when debugging. I have a bunch of Bug.BugName := 'formname.OnFormShow 1'; type statements scatter in problem areas as needed BugWhere: String You can use madExcept.RegisterExceptionHandler for this or the component and event: procedure TfMain.MadExceptionHandlerException( const exceptIntf: IMEException; var handled: Boolean); var ErrorCode: Integer; begin exceptIntf.BeginUpdate; // I add some headers to identify who got the error exceptIntf.BugReportHeader.Insert(0,'Customer',BugOffice); exceptIntf.BugReportHeader.Insert(0,'User Name',BugName); exceptIntf.BugReportHeader.Insert(0,'Program Location',BugWhere); if exceptIntf.ExceptObject is EDBISAMEngineError then begin ErrorCode := EDBISAMEngineError(exceptIntf.ExceptObject).ErrorCode; if (ErrorCode=DBISAM_REMOTECONNECT) or (ErrorCode=DBISAM_REMOTECOMMLOST) then begin // I remove buttons here as needed and kill the screenshots, but you could change any // of your default settings of madExcept exceptIntf.CreateScreenShot := False; exceptIntf.AppendScreenShot := False; exceptIntf.ContinueBtnVisible := False; exceptIntf.RestartBtnVisible := True; exceptIntf.CloseBtnVisible := True; exceptIntf.FocusedButton := bCloseApplication; exceptIntf.ExceptMsg := 'My custom message for connection problems with contact info.'; exceptIntf.AutoClose := 1; exceptIntf.AutoDelay := 15*60; // 15 minutes it will close end; end; exceptIntf.EndUpdate; end; Any ideas for improvement are welcome. I hope this helps others who may have similar needs. -Johnnie |
Wed, Jul 19 2006 7:38 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Johnnie,
<< Just finished writing this for my applications using DBISAM client/server. I thought I'd share it. >> Very nice, thank you. I've always thought that MadExcept is a pretty cool product. It just goes to show - just when you think something can't be improved upon, along comes a product like MadExcept. -- Tim Young Elevate Software www.elevatesoft.com |
Fri, Jul 21 2006 11:24 AM | Permanent Link |
"David Farrell-Garcia" | Johnnie Norsworthy wrote:
> Just finished writing this for my applications using DBISAM > client/server. I thought I'd share it. Why thank you. i might just use that. thanks for sharing. |
Sun, Jul 23 2006 11:02 PM | Permanent Link |
Oliver Bock | Johnnie Norsworthy wrote:
> Any ideas for improvement are welcome. I hope this helps others who may have > similar needs. I give the user a checkbox "Include database in report" so users can send back a compressed database backup. Of course that won't work well if your database if huge. I also keep track of any SQL being executed and include that in the bug report, along with our log file. Oliver |
This web page was last updated on Tuesday, September 17, 2024 at 04:19 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |