home *** CD-ROM | disk | FTP | other *** search
/ Delphi Programming Unleashed / Delphi_Programming_Unleashed_SAMS_Publishing_1995.iso / misc / excptexp / allexcep / main.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1995-03-21  |  747 b   |  44 lines

  1. unit Main;
  2.  
  3. { Program copyright (c) 1995 by Charles Calvert }
  4. { Project Name: ALLEXCEP }
  5.  
  6. interface
  7.  
  8. uses
  9.   SysUtils, WinTypes, WinProcs,
  10.   Messages, Classes, Graphics,
  11.   Controls, Forms, Dialogs,
  12.   StdCtrls;
  13.  
  14. type
  15.   TForm1 = class(TForm)
  16.     Button1: TButton;
  17.     Edit1: TEdit;
  18.     procedure Button1Click(Sender: TObject);
  19.   private
  20.     { Private declarations }
  21.   public
  22.   procedure Sam(Sender:TObject; E: Exception);
  23.     { Public declarations }
  24.   end;
  25.  
  26. var
  27.   Form1: TForm1;
  28.  
  29. implementation
  30.  
  31. {$R *.DFM}
  32.  
  33. procedure TForm1.Sam(Sender:TObject; E: Exception);
  34. begin
  35.   MessageBox(0, 'foo', nil, mb_ok);
  36. end;
  37.  
  38. procedure TForm1.Button1Click(Sender: TObject);
  39. begin
  40.   raise EInOutError.Create('hi');
  41. end;
  42.  
  43. end.
  44.