API referenceCore SDK

pdfSetErrorMode

Choose which error classes are logged and delivered to the

CategoryError handling
VariantspdfSetErrorMode (bare)
Thread safetyPer-document handle; set before multi-threaded use.

Purpose — Choose which error classes are logged and delivered to the callback.

Description — Stores an em* bitmask on the instance (FErrorMode). RaiseError consults it on every error: mode 0 (emIgnoreAll) returns immediately — no log entry, no callback. For a non-zero mode the error's type is mapped to one class bit and that bit is tested; a masked-off class is skipped for both the log and the callback. The class bits are emSyntaxError=$01, emValueError=$02, emWarning=$04, emFileError=$08, emFontError=$10; emAllErrors=$0000FFFF enables every class (the default).

Declarations

C
BOOL32 __stdcall pdfSetErrorMode(PPDF IPDF, int32_t ErrMode);
Delphi
function pdfSetErrorMode(const IPDF: PPDF; ErrMode: Integer): LongBool; stdcall; external 'LumasPdf.dll';

Parameters

ParameterTypeDescription
IPDFPPDFInstance handle.
ErrModeint32_tem* bitmask (see Lumas.Pdf.Consts).

Return valueTRUE on a valid handle; FALSE if the handle is invalid.

Remarks — The high-bit modifiers emNoFuncNames ($10000000) and emUseErrLog ($20000000) are accepted for ABI compatibility but are legacy no-ops in this engine — the indexed log is always available regardless. Set the mode once, right after pdfNewPDF, before doing work you want captured.

See alsopdfGetErrorMode, pdfSetOnErrorProc, pdfGetErrLogMessage

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Core SDK
Category

Setters

Exported names

pdfSetErrorMode

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.