mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-10 11:33:17 +00:00
Avoid errors by explicitely namespacing root exception
This commit is contained in:
@@ -78,7 +78,7 @@ class module_console_sphinxGenerateSuggestion extends Command
|
||||
|
||||
try {
|
||||
$connbas = connection::getPDOConnection($this->container, $sbas_id);
|
||||
} catch (Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@@ -93,7 +93,7 @@ class module_console_systemMailCheck extends Command
|
||||
$tmp_user->set_email(null);
|
||||
|
||||
unset($users[$id]);
|
||||
} catch (Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
$output->writeln('<error>Wrong id</error>');
|
||||
}
|
||||
}
|
||||
|
@@ -55,7 +55,7 @@ class module_console_systemTemplateGenerator extends Command
|
||||
$this->container['twig']->loadTemplate(str_replace($tplDir, '', $file->getPathname()));
|
||||
$output->writeln('' . $file . '');
|
||||
$n_ok ++;
|
||||
} catch (Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
$output->writeln('<error>' . $e->getMessage() . '</error>');
|
||||
$n_error ++;
|
||||
}
|
||||
|
@@ -85,7 +85,7 @@ class module_console_taskState extends Command
|
||||
$output->writeln($input->getOption('short') ? 'unknown_id' : $e->getMessage());
|
||||
|
||||
return self::EXITCODE_TASK_UNKNOWN;
|
||||
} catch (Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
$output->writeln($input->getOption('short') ? 'fatal_error' : $e->getMessage());
|
||||
|
||||
return self::EXITCODE_FATAL_ERROR;
|
||||
|
@@ -148,7 +148,7 @@ class module_console_taskrun extends Command
|
||||
|
||||
try {
|
||||
$this->task->run($runner);
|
||||
} catch (Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
$this->task->log(sprintf("taskrun : exception from 'run()', %s \n", $e->getMessage()));
|
||||
|
||||
return($e->getCode());
|
||||
|
Reference in New Issue
Block a user