On 22.1.2017 18:11, Mark Rogers wrote:
> Given the range of different compilers PoDoFo needs to support I
> don’t think you can ever safely throw an exception in a PoDoFo
> destructor

        Hi,
okay, that's the standard. It doesn't change anything on the fact that 
the example code is wrong and should be fixed.

Sadly, it also means that there is basically no way to claim the issue 
in other than abort/terminate way, right?

Once cannot call FinishPage() in the destructor for the user (I'm 
thinking of the lifetime of the m_pCanvas) thus it's either:

a) you build with DEBUG and you get an abort on assert()
b) (current behavior) you build without DEBUG and you get terminate()
    due to the standard
c) (suggested behavior) you build without DEBUG and nothing tells you
    that something goes wrong, which can mean that the PoDoFo creates
    an incorrect content stream.

There is no win, from my point of view.

I understand that you suggest to not abort the application when the 
random user code does things wrong, which I agree with. One should be 
able to cope with broken/unexpected data gracefully, instead of crashing.

That is, I'll keep the decision up to Dom.

        Bye,
        zyx

P.S.: By the way, no need to write to me, I do read the list messages, 
thus there is no need to CC me in your replies (as I currently receive 
the message twice).


-- 
http://www.litePDF.cz                                    i...@litepdf.cz

------------------------------------------------------------------------------
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
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to