Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7165983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:20:23+00:00 2026-05-28T14:20:23+00:00

While browsing System.Zip (Delphi XE2) to see how it works, I found this function:

  • 0

While browsing System.Zip (Delphi XE2) to see how it works, I found this function:

procedure VerifyWrite(Stream: TStream; var Buffer; Count: Integer);
begin
  if Stream.Write(Buffer, Count) <> Count then
    raise EZipException.CreateRes(@SZipErrorWrite) at ReturnAddress;
end;

It’s the at ReturnAddress part that sort of puzzles me.

I didn’t know that at was a valid keyword (the syntax highlighter doesn’t seem to recognise it either).

According to the IDE it’s declared as System.ReturnAddress, but I can only find it declared as a label somewhere in the (asm) code of procedure _HandleAnyException;. The system unit is full of references to it though.

So what I would like to know is this:

  1. What is ReturnAddress?
  2. What exactly does Raise Exception.Create ... at ReturnAddress do?

Bonuspoints if you can give a real-world example of where this would be a useful construct, or if you can advice against using it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T14:20:23+00:00Added an answer on May 28, 2026 at 2:20 pm

    ReturnAddress is the address to which VerifyWrite would have returned when finished.

    Raise Exception.Create... at ReturnAddress means that when the exception dialog is displayed, it would indicate the address of the exception as being at ReturnAddress. In other words, the exception message would read Exception <whatever> raised at <ReturnAddress>: <Exception Message>.

    Here is an excerpt from the help file for Delphi 7. It’s nearly the same as the online version.

    To raise an exception object, use an instance of the exception
    class with a raise statement. For example,

    raise EMathError.Create;
    

    In general, the form of a raise statement is

    raise object at address
    

    where object and at address are both optional; see
    Re-raising exceptions. When an address is specified,
    it can be any expression that evaluates to a pointer
    type, but is usually a pointer to a procedure or function.
    For example:

    raise Exception.Create('Missing parameter') at @MyFunction;
    

    Use this option to raise the exception from an earlier point
    in the stack than the one where the error actually occurred.

    Note the last sentence in particular. It’s pretty specific about the use of at <address>.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While browsing some source code I came across a function like this: void someFunction(char
While browsing questions and answers in this forum i found a piece of code
I found this code for a generic DAO interface while browsing around: public interface
I've found a function to spin text while browsing. When you then, at the
While browsing some code I found a call to OpenPrinter() . The code compiles
While browsing I came across this blog post about using the Wikipedia API from
I'm learning JavaScript and while browsing through the jQuery library I see : (colon)
well, I'm quite new to jQuery and while browsing all the documentation I found
While browsing some code, I came across this line: if False: #shedskin I understand
While browsing the source code of the Scala API, I met this package definition

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.