Article

From:
To:
Barry Kelly
Subject:
Re: Exceptions vs Error codes
Newsgroup:
borland.public.delphi.objectpascal

Re: Exceptions vs Error codes

In article <✉4ax.com>
	Barry Kelly <✉eircom.net> wrote:

A mistake:
> ---8<---
>        ms:= TMemoryStream.Create;
>        try
>          jpgOut.JPEGNeeded;
>          jpgOut.SaveToStream(ms);
>          Response.ContentStream:= ms;
>        except
>          on e: Exception do
>          begin
>            LogExcept(e);
>            ms.Free;

Oops. These are the wrong way around.

             ms.Free;              LogExcept(e);
>          end;
>        end;
>        Response.ContentStream.Position:= 0;
>        [...]
> --->8---


-- Barry
FYI: Phrase searches are enclosed in either single or double quotes
 
 
Originally created by
Tamarack Associates
Fri, 29 Mar 2024 14:35:58 UTC
Copyright © 2009-2024
HREF Tools Corp.