Dear,
In PdfMutexWrapper.h, the "throw rError;" from within the destructor should
really be removed. Destructors should never ever throw (or here re-throw)
because if that happens very weird things will follow, no matter if and how
calling code catch the exception and tries to recover.
PdfMutexWrapper::~PdfMutexWrapper()
{
#if defined(DEBUG)
try {
m_rMutex.UnLock();
}
catch( PdfError & rError )
{
rError.PrintErrorMsg();
//throw rError; // Should be commented out or removed
}
#else
m_rMutex.UnLock();
#endif
}
Better yet, the try / catch block on m_rMutex.Unlock() (which can throw) should
be set on, wether or not this is a debug build. It is even more important on a
release build that the destructor does not throw than in a debug build where it
could be wanted for the debugger to catch.
I would suggest to change that to:
PdfMutexWrapper::~PdfMutexWrapper()
{
try {
m_rMutex.UnLock();
}
#if defined(DEBUG)
catch( PdfError & rError )
{
rError.PrintErrorMsg();
}
#else
catch (PdfError &)
{
}
#endif
}
--
Best Regards, Meilleures salutations, Met vriendelijke groeten,
Olivier Mascia
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users