Make sure that we catch exceptions that may occur during the setup.

SVN:code[96]
This commit is contained in:
Denis Flaven
2009-08-22 09:48:03 +00:00
parent 6c70bc4f03
commit 3cd364ab4b

View File

@@ -484,6 +484,8 @@ 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 */);
} }
try
{
switch($sOperation) switch($sOperation)
{ {
case 'step1': case 'step1':
@@ -532,5 +534,14 @@ switch($sOperation)
$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();
?> ?>