PDFlibErrorMessage
Error handling
Description
PDFlibErrorMessage maps a numeric error code, such as the value reported by LastErrorCode, to its human-readable English message
The codes fall into documented families: 0 is success, 1xx covers legacy encryption parameters and request validation, 3xx covers save and write failures, 4xx covers load and authentication failures, and 5xx covers generic, render and IO failures
The LoggerDemo logs PDFlibErrorMessage(403) alongside a simulated encrypted-document scenario to show translated logging
Syntax
Delphi
Function PDFlibErrorMessage(Code: Integer): WideString;Fields
| Code | The numeric error code to translate |
|---|
Return value
The message text for the code, for example 403 yields Encrypted document requires password
Remarks
Unknown codes fall back to a generic message, so the function is safe to call on any integer
Use PDFlibErrorCategory when the caller needs the code family rather than the text
See also
LastErrorCode, PDFlibErrorCategory, TPDFlibLogger, TPDFlibLogLevel