## Printer Device Driver

[prev][next][parent][TOC]

### Error Assertion

To use the GenPLib Error-Assertion package, you must include:

    INCL_GENPLIB_ASSERT

The error-assertion package of the GenPLib consists of six APIs. Four are macros:

ASSERTT () and ASSERTF ()
DBPRINTF (()) and DBPRINTIF (())

The remaining two are functions:

PMAssert
BaseAssert

PMAssert Validates the return code from OS/2 Presentation Manager (PM) APIs that display the WinGetLastError() result and a supplied text string in a message box.

BaseAssert Validates OS/2 APIs that use the APIRET return code.

ASSERTT () and ASSERTF () ASSERTT causes an error assertion if the supplied test evaluates to TRUE. ASSERTF causes an error assertion if the supplied test evaluates to FALSE. An assertion is an INT3 with kernel debug information displaying the failed test, file name, and line number of the location from which the assertion was called.

DBPRINTF (()) and DBPRINTIF (()) DBPRINTF outputs the supplied text string to the kernel debugger. DBPRINTIF outputs the supplied text string to the kernel debugger if the supplied condition is TRUE.