In the helloworld example I get a crash if the respective pdf file is
already open. The catch block doesn't catch the exception either. I noticed
the code throws an exception by checking pStream first it is already
invalid so that's why it doesn't even get to exception.

The seems like a trivial issue and I am sure would have been thought of, am
I missing something? I am using 0.9.1


PdfOutputDevice::PdfOutputDevice( const char* pszFilename )
{
    this->Init();

    if( !pszFilename )
    {
        PODOFO_RAISE_ERROR( ePdfError_InvalidHandle );
    }

std::fstream *pStream = new std::fstream(pszFilename,
std::fstream::binary|std::ios_base::in | std::ios_base::out |
std::ios_base::trunc);
if(pStream->fail()) {
PODOFO_RAISE_ERROR( ePdfError_InvalidHandle );
}
m_pStream = pStream;
m_pReadStream = pStream;
    PdfLocaleImbue(*m_pStream);

    /*
    m_hFile = fopen( pszFilename, "wb" );
    if( !m_hFile )
    {
        PODOFO_RAISE_ERROR_INFO( ePdfError_FileNotFound, pszFilename );
    }
    */
}
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to