home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 December / Chip_2001-12_cd1.bin / zkuste / delphi / kompon / d23456 / CAJSCRTP.ZIP / demo_del / tryexcept2.ifs < prev    next >
Text File  |  2001-06-06  |  377b  |  16 lines

  1. Program IFSTest;
  2. const
  3.   ECustomError = 32777;
  4. Begin  
  5.   try
  6.    writeln(1/0);
  7.   except
  8.   writeln(GetLastErrorAsString+' at '+GetLastErrorModule+'('+inttostr(GetLastErrorPosition)+')');
  9.   end;
  10.   try
  11.     raiseError(ECustomError, 'No Error!!!');
  12.   except
  13.   writeln(GetLastErrorAsString+' at '+GetLastErrorModule+'('+inttostr(GetLastErrorPosition)+')');
  14.   end;
  15. End.
  16.