Change exceptions handle to the PlaYUVerExcpetions

This commit is contained in:
jfmcarreira committed 2016-05-09 01:20:33 +01:00
1 parent 617c42563d
commit d7d3e9f4ea
4 files changed
+11 -8

No files matched your search

+6 -6
View File
@@ -239,10 +239,10 @@ Void PlaYUVerApp::loadFile( QString fileName, PlaYUVerStreamInfo* pStreamInfo )
videoSubWindow->close();
}
}
catch( const char *msg )
catch( PlaYUVerFailure& e )
{
videoSubWindow->close();
QString warningMsg = "Cannot open file " + QFileInfo( fileName ).fileName() + " with the following error: \n" + msg;
QString warningMsg = "Cannot open file " + QFileInfo( fileName ).fileName() + " with the following error: \n" + e.what();
QMessageBox::warning( this, QApplication::applicationName(), warningMsg );
printMessage( warningMsg, LOG_ERROR );
}
@@ -329,10 +329,10 @@ Void PlaYUVerApp::save()
{
saveWindow->save( fileName );
}
catch( const char *msg )
catch( PlaYUVerFailure& e )
{
QApplication::restoreOverrideCursor();
QString warningMsg = "Cannot save file " + QFileInfo( fileName ).fileName() + " with the following error: \n" + msg;
QString warningMsg = "Cannot save file " + QFileInfo( fileName ).fileName() + " with the following error: \n" + e.what();
QMessageBox::warning( this, QApplication::applicationName(), warningMsg );
printMessage( warningMsg, LOG_ERROR );
return;
@@ -353,9 +353,9 @@ Void PlaYUVerApp::format()
addStreamInfoToRecentList( pcVideoSubWindow->getStreamInfo() );
}
}
catch( const char *msg )
catch( PlaYUVerFailure& e )
{
QString warningMsg = "Cannot change format of " + QFileInfo( pcVideoSubWindow->getCurrentFileName() ).fileName() + " with the following error: \n" + msg;
QString warningMsg = "Cannot change format of " + QFileInfo( pcVideoSubWindow->getCurrentFileName() ).fileName() + " with the following error: \n" + e.what();
QMessageBox::warning( this, QApplication::applicationName(), warningMsg );
printMessage( warningMsg, LOG_ERROR );
qDebug( ) << warningMsg;
+1 -1
View File
@@ -330,7 +330,7 @@ Bool VideoSubWindow::loadFile( QString cFilename, Bool bForceDialog )
{
m_pCurrStream->open( cFilename.toStdString(), Width, Height, InputFormat, BitsPel, Endianness, FrameRate, true );
}
catch( const char *msg )
catch( ... )
{
if( formatDialog.runConfigureFormatDialog( QFileInfo( cFilename ).fileName(), Width, Height, InputFormat, BitsPel, Endianness, FrameRate )
== QDialog::Rejected )