| 24 | std::string GetHpdfErrorDescription( HPDF_STATUS errorCode ); |
| 25 | |
| 26 | void 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( ... ) \ |
| 43 | do { \ |
no test coverage detected