Add error handling when saving a frame

This commit is contained in:
jfmcarreira committed 2016-04-28 18:26:10 +01:00
1 parent af214bc28d
commit 85d93780b6
2 files changed
+9 -2

No files matched your search

+8 -2
View File
@@ -329,10 +329,16 @@ Void PlaYUVerApp::save()
if( !fileName.isEmpty() )
{
m_cLastOpenPath = QFileInfo( fileName ).path();
if( !saveWindow->save( fileName ) )
try
{
saveWindow->save( fileName );
}
catch( const char *msg )
{
QApplication::restoreOverrideCursor();
QMessageBox::warning( this, tr( "plaYUVer" ), tr( "Cannot save file %1" ).arg( fileName ) );
QString warningMsg = "Cannot save file " + QFileInfo( fileName ).fileName() + " with the following error: \n" + msg;
QMessageBox::warning( this, QApplication::applicationName(), warningMsg );
printMessage( warningMsg, LOG_ERROR );
return;
}
}
+1
View File
@@ -83,6 +83,7 @@ Bool StreamHandlerPortableMap::openHandler( std::string strFilename, Bool bInput
}
else
{
closeHandler();
return false;
}
}