mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 23:32:17 +02:00
Make sure that we catch exceptions that may occur during the setup.
SVN:code[96]
This commit is contained in:
@@ -484,8 +484,10 @@ catch(Exception $e)
|
|||||||
// We'll end here when the tmp config file does not exist. It's normal
|
// We'll end here when the tmp config file does not exist. It's normal
|
||||||
$oConfig = new Config(TMP_CONFIG_FILE, false /* Don't try to load it */);
|
$oConfig = new Config(TMP_CONFIG_FILE, false /* Don't try to load it */);
|
||||||
}
|
}
|
||||||
switch($sOperation)
|
try
|
||||||
{
|
{
|
||||||
|
switch($sOperation)
|
||||||
|
{
|
||||||
case 'step1':
|
case 'step1':
|
||||||
$oP->log("Info - ========= Wizard step 1 ========");
|
$oP->log("Info - ========= Wizard step 1 ========");
|
||||||
DisplayStep1($oP);
|
DisplayStep1($oP);
|
||||||
@@ -531,6 +533,15 @@ switch($sOperation)
|
|||||||
default:
|
default:
|
||||||
$oP->error("Error: unsupported operation '$sOperation'");
|
$oP->error("Error: unsupported operation '$sOperation'");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch(Exception $e)
|
||||||
|
{
|
||||||
|
$oP->error("Error: '".$e->getMessage()."'");
|
||||||
|
}
|
||||||
|
catch(CoreException $e)
|
||||||
|
{
|
||||||
|
$oP->error("Error: '".$e->getHtmlDesc()."'");
|
||||||
}
|
}
|
||||||
$oP->output();
|
$oP->output();
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user