22.03.2015 Views

DLI Implementation and Reference Guide - Datalogics

DLI Implementation and Reference Guide - Datalogics

DLI Implementation and Reference Guide - Datalogics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Error Testing <strong>and</strong> Recovery 16.5<br />

DLExceptionMessage<br />

Returns: char*<br />

DLExceptionMessage returns a non-NULL pointer if an additional message string<br />

was generated by Adobe PDF Library or <strong>DLI</strong> when an exception was raised. This<br />

pointer may be NULL when an error is raised if the Adobe PDF Library or <strong>DLI</strong><br />

function does not supply the optional message string.<br />

The application should call DLExceptionFlag after each Adobe PDF Library <strong>and</strong><br />

<strong>DLI</strong> function call to determine if an exception was raised. If the flag is non-zero, the<br />

application should use DLExceptionCode <strong>and</strong>/or DLExceptionMessage to<br />

obtain additional information, then h<strong>and</strong>le the exception as appropriate.<br />

These are the basic steps that should be followed:<br />

1 Call the desired Adobe PDF Library/<strong>DLI</strong> function<br />

2 Get the Exception Status by calling DLExceptionFlag<br />

3 If DLExceptionFlag returns a non-zero value:<br />

• Get additional error information (DLExceptionCode, ASGetErrorString,<br />

DLExceptionFlag)<br />

• H<strong>and</strong>le exception as appropriate to the application (e.g. switch to a default font,<br />

flush the current statement, etc.).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!