Changeset 165
- Timestamp:
- Feb 8, 2011, 11:07:15 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ExceptionLogger/UExceptionLogger.pas
r149 r165 27 27 destructor Destroy; override; 28 28 procedure ExceptionHandler(Sender: TObject; E: Exception); 29 procedure ThreadExceptionHandler(Thread: TThread; E: Exception);30 29 procedure CreateTextReport(Output: TStringList); 31 30 procedure LogToFile(Report: TStringList); … … 137 136 begin 138 137 ExceptionForm.LoadStackTraceToListView(StackTrace); 139 ExceptionForm.ShowModal;138 if not ExceptionForm.Visible then ExceptionForm.ShowModal; 140 139 end; 141 140 … … 145 144 StackTrace.GetExceptionBackTrace; 146 145 LastException := E; 147 MakeReport; 148 end; 149 150 procedure TExceptionLogger.ThreadExceptionHandler(Thread: TThread; E: Exception 151 ); 152 begin 153 BackTraceStrFunc := @StabBackTraceStr; 154 StackTrace.GetExceptionBackTrace; 155 LastException := E; 156 TThread.Synchronize(Thread, MakeReport); 146 if Sender is TThread then TThread.Synchronize(TThread(Sender), MakeReport) 147 else MakeReport; 157 148 end; 158 149
Note:
See TracChangeset
for help on using the changeset viewer.