File tree Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -1624,13 +1624,22 @@ void QgisApp::fileOpen()
16241624
16251625 QgsProject::instance ()->filename ( fullPath );
16261626
1627- if ( QgsProject::instance ()-> read () )
1627+ try
16281628 {
1629- setTitleBarText_ ( *this );
1630- mMapCanvas ->setMapUnits (QgsProject::instance ()->mapUnits ());
1631- emit projectRead (); // let plug-ins know that we've read in a new
1632- // project so that they can check any project
1633- // specific plug-in state
1629+ if ( QgsProject::instance ()->read () )
1630+ {
1631+ setTitleBarText_ ( *this );
1632+ mMapCanvas ->setMapUnits (QgsProject::instance ()->mapUnits ());
1633+ emit projectRead (); // let plug-ins know that we've read in a new
1634+ // project so that they can check any project
1635+ // specific plug-in state
1636+ }
1637+ }
1638+ catch ( std::exception & e )
1639+ {
1640+ QMessageBox::critical (this ,
1641+ tr (" QGIS Project Read Error" ),
1642+ tr (" " ) + " \n " + e.what () );
16341643 }
16351644 }
16361645
@@ -3083,7 +3092,7 @@ void QgisApp::socketConnectionClosed()
30833092void QgisApp::socketError (int e)
30843093{
30853094 QApplication::restoreOverrideCursor ();
3086- // get errror type
3095+ // get error type
30873096 QString detail;
30883097 switch (e)
30893098 {
You can’t perform that action at this time.
0 commit comments