GetLastError
IPDFDocument4 :: General document management :: Common

See Also Example
Collapse All

This method gets information about the most recent error.

Syntax

BSTR GetLastError ()
Return value
Empty string, if no error occurred; otherwise a string with a description of the most recent error.

Example

Using the LastError Method

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.SetFlatness(-2222);
{ Now PDF.GetLastError will return an error description: }
{ "01/01/08 12:00 ERROR: PDFDocumentImpl::SetFlatness - Value (-2222) out of range - should be between 0 and 100" }
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->SetFlatness(-2222);
// Now PDF->GetLastError will return an error description:
// "01/01/08 12:00 ERROR: PDFDocumentImpl::SetFlatness - Value (-2222) out of range - should be between 0 and 100"
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.SetFlatness(-2222);
// Now PDF.GetLastError will return an error description:
// "01/01/08 12:00 ERROR: PDFDocumentImpl::SetFlatness - Value (-2222) out of range - should be between 0 and 100"
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.SetFlatness -2222
' Now PDF.GetLastError will return an error description:
' "01/01/08 12:00 ERROR: PDFDocumentImpl::SetFlatness - Value (-2222) out of range - should be between 0 and 100"

See Also

Reference