mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
- Try to protect as much as possible from fatal errors occuring during the data load:
1) Make sure we have enough memory to perform the task 2) In case of fatal error in the Ajax call, catch it, display it to the end-user and stop the installation. See Trac #84 for more information. SVN:trunk[298]
This commit is contained in:
@@ -103,7 +103,8 @@ function DoLoadDataAsynchronous()
|
||||
|
||||
$('#setup').block({message: '<p>Loading data...<br/><div id=\"progress\">0%</div></p>'});
|
||||
$('#progress').progression( {Current:0, Maximum: 100, aBackgroundImg: 'orange-progress.gif', aTextColor: '#000000'} );
|
||||
LoadNextDataFile('', '');
|
||||
$('#log').ajaxError(function(e, xhr, settings, exception) { alert('Fatal error detected: '+ xhr.responseText); $('#log').append(xhr.responseText); $('#setup').unblock(); } );
|
||||
LoadNextDataFile('', '');
|
||||
return false; // Stop here for now
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user