diff --git a/tools/PlaYUVerTools.cpp b/tools/PlaYUVerTools.cpp index a1d8a4e..2741819 100644 --- a/tools/PlaYUVerTools.cpp +++ b/tools/PlaYUVerTools.cpp @@ -281,9 +281,13 @@ Int PlaYUVerTools::Open( Int argc, Char *argv[] ) pcModFrame = applyFrameModule(); } PlaYUVerStream* pcModStream = new PlaYUVerStream; - if( !pcModStream->open( outputFileNames[0], pcModFrame->getWidth(), pcModFrame->getHeight(), pcModFrame->getPelFormat(), pcModFrame->getBitsPel(), - pcModFrame->getEndianness(), 1, false ) ) + try { + pcModStream->open( outputFileNames[0], pcModFrame->getWidth(), pcModFrame->getHeight(), pcModFrame->getPelFormat(), pcModFrame->getBitsPel(), pcModFrame->getEndianness(), 1, false ); + } + catch( const char *msg ) + { + log( LOG_ERROR, "Cannot open input stream %s with the following error %s!\n", outputFileNames[0].c_str(), msg ); delete pcModStream; pcModStream = NULL; return 2;