Ignore:
Timestamp:
Aug 17, 2011, 10:08:55 AM (13 years ago)
Author:
george
Message:
  • Modified: Now detailed info is displayed after user click Details. User will see at first only necessary error message.
  • Modified: Now methods in TStackTrace class loads call stack and exception stack only as list of frame address. Then delayed GetInfo method should be called to fully load call stack debug information. This is useful in case of external debug file where loading time could be significant.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ExceptionLogger/UExceptionForm.pas

    r167 r264  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   CustomLineInfo, ComCtrls, UStackTrace;
     9  CustomLineInfo, ComCtrls, ExtCtrls, UStackTrace, UExceptionLogger;
    1010
    1111type
     
    1616
    1717  TExceptionForm = class(TForm)
     18    ButtonDetails: TButton;
     19    ButtonClose: TButton;
    1820    ButtonKill: TButton;
    19     ButtonClose: TButton;
    2021    CheckBoxIgnore: TCheckBox;
     22    Image1: TImage;
     23    Label1: TLabel;
     24    LabelMessage: TLabel;
    2125    ListView1: TListView;
    2226    MemoExceptionInfo: TMemo;
    2327    PageControl1: TPageControl;
     28    PanelBasic: TPanel;
     29    PanelDescription: TPanel;
     30    PanelButtons: TPanel;
    2431    TabSheet1: TTabSheet;
    2532    TabSheet2: TTabSheet;
    2633    procedure ButtonCloseClick(Sender: TObject);
     34    procedure ButtonDetailsClick(Sender: TObject);
    2735    procedure ButtonKillClick(Sender: TObject);
    2836    procedure FormCreate(Sender: TObject);
    2937    procedure FormDestroy(Sender: TObject);
    3038    procedure FormShow(Sender: TObject);
    31   private
     39    procedure Image1Click(Sender: TObject);
    3240  public
     41    Logger: TExceptionLogger;
    3342    procedure LoadStackTraceToListView(StackTrace: TStackTrace);
    3443  end;
     
    4352procedure TExceptionForm.FormShow(Sender: TObject);
    4453begin
     54  Height := PanelBasic.Height + PanelButtons.Height;
    4555  PageControl1.ActivePageIndex := 0;
    4656  CheckBoxIgnore.Checked := False;
     57end;
     58
     59procedure TExceptionForm.Image1Click(Sender: TObject);
     60begin
     61
    4762end;
    4863
     
    5570begin
    5671  Close;
     72end;
     73
     74procedure TExceptionForm.ButtonDetailsClick(Sender: TObject);
     75begin
     76  if PanelDescription.Height = 0 then
     77    Height := PanelBasic.Height + PanelButtons.Height + 200
     78    else Height := PanelBasic.Height + PanelButtons.Height;
     79  Application.ProcessMessages;
     80  if MemoExceptionInfo.Text = '' then Logger.LoadDetails;
    5781end;
    5882
     
    7296  NewItem: TListItem;
    7397begin
    74   with ListView1, Items do begin
     98  with ListView1, Items do
     99  try
    75100    BeginUpdate;
    76101    Clear;
     
    87112      end;
    88113    end;
     114  finally
    89115    EndUpdate;
    90116  end;
Note: See TracChangeset for help on using the changeset viewer.