Name
RaiseList Function
Syntax
function RaiseList: Pointer;
Description
The RaiseList
function returns a pointer to the
current exception frame, which might be the first node in a list of
exceptions. The System unit does not declare the
type of the exception frame; the record is shown in the example.
The first frame in the list is the current exception. If an exception handler raises an exception, you can have multiple frames in the exception list.
RaiseList is a real function.
Tips and Tricks
Usually, the
try-exceptstatement provides the necessary functionality for handling exceptions. You shouldn’t need to callRaiseListunless you are trying to handle exceptions in a non-standard way.Each thread has its own separate exception list.
Example
type
PRaiseFrame = ^TRaiseFrame;
TRaiseFrame = packed record
NextRaise: PRaiseFrame;
ExceptAddr: Pointer;
ExceptObject: TObject;
ExceptionRecord: PExceptionRecord; // Type defined in Windows unit.
end;
...
try
...
except
Code := PRaiseFrame(RaiseList).ExceptionRecord.ExceptionCode;
if Code = Exception_BreakPoint then
...
end;See Also
| ErrorProc Variable, Except Keyword, ExceptProc Variable, Raise Keyword, SetRaiseList Procedure, Try Keyword |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access