Catch exception during startup
This commit is contained in:
parent
8bba2ef704
commit
c5ed63022c
1 changed files with 7 additions and 1 deletions
|
@ -555,7 +555,11 @@ public class OsmandApplication extends Application implements ClientContext {
|
|||
player = null;
|
||||
if (savingTrackHelper.hasDataToSave()) {
|
||||
startDialog.startTask(getString(R.string.saving_gpx_tracks), -1);
|
||||
warnings.addAll(savingTrackHelper.saveDataToGpx());
|
||||
try {
|
||||
warnings.addAll(savingTrackHelper.saveDataToGpx());
|
||||
} catch (RuntimeException e) {
|
||||
warnings.add(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
// restore backuped favorites to normal file
|
||||
|
@ -568,6 +572,8 @@ public class OsmandApplication extends Application implements ClientContext {
|
|||
}
|
||||
bak.renameTo(save);
|
||||
}
|
||||
} catch (RuntimeException e) {
|
||||
warnings.add(e.getMessage());
|
||||
} finally {
|
||||
synchronized (OsmandApplication.this) {
|
||||
final ProgressDialog toDismiss;
|
||||
|
|
Loading…
Reference in a new issue