MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / pdfPrintError

Function pdfPrintError

source/MRIOExtras/MRPdf.cpp:26–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24std::string GetHpdfErrorDescription( HPDF_STATUS errorCode );
25
26void pdfPrintError( const char* funcName, HPDF_Doc doc, HPDF_STATUS status )
27{
28 if ( status == HPDF_OK )
29 return;
30 spdlog::warn( "Pdf: Error in {} call.", funcName );
31 spdlog::warn( "Failed with error: {} {}", status, GetHpdfErrorDescription( status ) );
32 if ( doc )
33 {
34 status = HPDF_GetErrorDetail( doc );
35 if ( status != HPDF_OK )
36 spdlog::warn( "Error detail: {} {}", status, std::strerror( status ) );
37 }
38 assert( false );
39 HPDF_ResetError( doc );
40}
41
42#define MR_HPDF_CHECK_RES_STATUS( ... ) \
43do { \

Callers 1

getFontMethod · 0.85

Calls 1

GetHpdfErrorDescriptionFunction · 0.85

Tested by

no test coverage detected