🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.language.objectpascal
Article #136

Re: Application Errors

#136
From: schumacker
Date: Thu, 19 Feb 2004 08:42
35 lines
1598 bytes
hi luke:

The way to catch all the errors in te application is using a
try..except statemente, like the one on this example:


function TSomething.aFunction: type
begin
   try
     {The code of yout function}
     ...
   except
     on ExceptionType do
       begin
          {Code for picking up the exception}
       end; 
     on ...
   finally
      {This part of the code will always be executed}
end;

If you want to see the exception message use this in the " on
ExceptionType do " part

on E: Exception do
 showMessage(E.message);


You can look in the delphi help for more about this try..except
statements.
Good luck Luke, and may the force be with you :P

Greetings, 

Schumacker
Technical Details
Message-ID: <e1eadaf3.0402190042.5ebf12f0@posting.google.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail
References: <4986e816.0402162214.741fcde3@posting.google.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 109d30,f6157de330c7c6fd
X-Google-Attributes: gid109d30,public
X-Google-ArrivalTime: 2004-02-19 00:42:58 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail
From: miguelcampoy@hotmail.com (schumacker)
Newsgroups: borland.public.delphi.language.objectpascal
Subject: Re: Application Errors
Date: 19 Feb 2004 00:42:57 -0800
Organization: http://groups.google.com
Lines: 35
Message-ID: <e1eadaf3.0402190042.5ebf12f0@posting.google.com>
References: <4986e816.0402162214.741fcde3@posting.google.com>
NNTP-Posting-Host: 80.28.46.60
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1077180178 31639 127.0.0.1 (19 Feb 2004 08:42:58 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 19 Feb 2004 08:42:58 +0000 (UTC)