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
Tue, 07 Feb 2023 04:23:01 UTC
Copyright © 2009-2023
HREF Tools Corp.