On Wed, 2018-02-21 at 21:51 +0100, Dominik Seichter wrote:
> It should always be legal to call this:
> PODOFO_RAISE_LOGIC_IF( m_stack.empty(), "Can get current
> graphicsstate!" );
> As it translates to:
> if( m_stack.empty() ) {
>  throw ...
> }

the macro is fine, the problem is whether you compile Release or Debug
version of the PoDoFo. From src/base/PdfError.h:

   #ifndef NDEBUG
       // Woo for double-negatives. We define PODOFO_RAISE_LOGIC_IF unless 
we've been told not to by NDEBUG.
       #define PODOFO_RAISE_LOGIC_IF( x, y ) { if (x) throw ::PoDoFo::PdfError( 
ePdfError_InternalLogic, __FILE__, __LINE__, y ); };
       #define PODOFO_RAISE_LOGIC_IF( x, y ) {};

My suggestion was to remove that '#ifndef NDEBUG' and define the
PODOFO_RAISE_LOGIC_IF with the 'throw' always, regardless of the build


Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Podofo-users mailing list

Reply via email to