Add error handling when saving a frame
This commit is contained in:
1 parent
af214bc28d
commit
85d93780b6
2 files changed
+9
-2
No files matched your search
+8
-2
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,6 +83,7 @@ Bool StreamHandlerPortableMap::openHandler( std::string strFilename, Bool bInput
|
||||
}
|
||||
else
|
||||
{
|
||||
closeHandler();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user