Doc.this

Creates a new Doc instance with a delegate which is invoked when an error occurred.

The delegate must be in the form of

void error_callback(uint error_no, uint detail_no)

, where error_no it's the number's error and detail_no it's the detail's number

  1. this()
  2. this(void delegate(HPDF_STATUS error_no, HPDF_STATUS detail_no) _dlg)
    class Doc
    this
    (
    void delegate
    (
    HPDF_STATUS error_no
    ,
    HPDF_STATUS detail_no
    )
    _dlg
    )

Parameters

_dlg void delegate
(
HPDF_STATUS error_no
,
HPDF_STATUS detail_no
)

The delegate wich is invoked

Return Value

the new Doc instance

Examples

void error_handler(uint error_no, uint detail_no) {
   writefln("error_no: %s, detail_no: %s", error_no, detail_no);
}
Doc document = new Doc( &errorHandler );

Meta