N°1190 - Better error reporting and disk cleanup.

SVN:trunk[5145]
This commit is contained in:
Eric Espié
2017-11-30 08:58:58 +00:00
parent 6477e2e1bb
commit c08edc207c
2 changed files with 4 additions and 2 deletions

View File

@@ -61,6 +61,7 @@ try
catch (Exception $e)
{
$oPage->p('Error: '.$e->getMessage());
IssueLog::Error($sOperation.' - '.$e->getMessage());
}
}
$oPage->output();
@@ -156,6 +157,7 @@ EOF
{
$oRestoreMutex->Unlock();
$oPage->p('Error: '.$e->getMessage());
IssueLog::Error($sOperation.' - '.$e->getMessage());
}
}
$oPage->output();
@@ -179,6 +181,6 @@ EOF
}
catch (Exception $e)
{
IssueLog::Error($e->getMessage());
IssueLog::Error($sOperation.' - '.$e->getMessage());
}

View File

@@ -131,7 +131,7 @@ class DBRestore extends DBBackup
$oArchive->extractFileTo($sDataDir, 'itop-dump.sql');
$sDataFile = $sDataDir.'/itop-dump.sql';
$this->LoadDatabase($sDataFile);
unlink($sDataFile);
SetupUtils::rrmdir($sDataDir);
// Update the code
//