diff --git a/buildNumber.json b/buildNumber.json index ec2d89f3..b667dfaa 100644 --- a/buildNumber.json +++ b/buildNumber.json @@ -1 +1 @@ -{ "buildNumber" : "00104"} \ No newline at end of file +{ "buildNumber" : "00130"} \ No newline at end of file diff --git a/src/core/FileLoader.js b/src/core/FileLoader.js index 449ef8c0..d92dc52c 100644 --- a/src/core/FileLoader.js +++ b/src/core/FileLoader.js @@ -30,6 +30,8 @@ Changes: - Issue #120 : Review the UserInterface -v2.2.0: - Issue #129 : Add an indicator when the travel is modified and not saved + -v2.3.0: + - Issue #171 : Add a warning when opening a file with invalid version Doc reviewed 20200801 Tests ... */ @@ -169,17 +171,21 @@ function ourNewFileLoader ( ) { } return; } - if ( mustMerge ) { - newFileCompactor ( ).decompressMerge ( fileContent ); - } - else { - theProfileWindowsManager.deleteAllProfiles ( ); - newFileCompactor ( ).decompress ( fileContent ); + try { + if ( mustMerge ) { + newFileCompactor ( ).decompressMerge ( fileContent ); + } + else { + theProfileWindowsManager.deleteAllProfiles ( ); + newFileCompactor ( ).decompress ( fileContent ); + } + myDisplay ( ); + if ( ! mustMerge ) { + theMouseUI.saveStatus = SAVE_STATUS.saved; + } } - - myDisplay ( ); - if ( ! mustMerge ) { - theMouseUI.saveStatus = SAVE_STATUS.saved; + catch ( err ) { + theErrorsUI.showError ( 'An error occurs when reading the file : ' + err.message ); } };