Created
January 30, 2012 18:28
-
-
Save ldaniel/1705819 to your computer and use it in GitHub Desktop.
Manipulando exceções em Delphi 4.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
procedure TForm1.FormCreate(Sender: TObject); | |
var | |
Buffer : Pointer; | |
begin | |
Buffer := AllocMem(1024); | |
try | |
{ Codigo que pode gerar uma excecao } | |
finally | |
FreeMem(Buffer); | |
end; | |
end; | |
{ Ou ainda } | |
procedure TForm1.TratarExcecao(Sender : TObject; E : Exception); | |
begin | |
{ Codigo para tratar a excecao } | |
end; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment