GetLastError
Document parts, variable data, document editing
Description
Returns the message recorded by the most recent ReadRange call on a TCallbackByteRangeSource
The internal TCallbackByteRangeSource class adapts the read and availability callbacks supplied to TPDFlib.LoadFromRangeSource into a reference-counted IPLByteRangeSource and IPLByteRangeAvailabilitySource
Syntax
Function TCallbackByteRangeSource.GetLastError: AnsiString;
Remarks
ReadRange clears the message at the start of every call, so the value reflects only the most recent attempt
A rejected range request records a fixed invalid-request message, and an exception raised by the read callback records the exception message
A callback result that is clamped to the requested count is not treated as an error and leaves the message empty
Return values
| Empty string | The last ReadRange call completed without a recorded failure |
|---|---|
| Message text | The invalid-request message or the callback exception message recorded by the last ReadRange call |
See also
ReadRange, IsRangeAvailable, GetRangeSupported, GetTotalSize, LoadFromRangeSource