Avoid errors by explicitely namespacing root exception

This commit is contained in:
Romain Neutron
2014-02-20 11:28:31 +01:00
parent fab9a64ae0
commit 2af21c064c
73 changed files with 164 additions and 164 deletions

View File

@@ -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;
}

View File

@@ -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>');
}
}

View File

@@ -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 ++;
}

View File

@@ -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;

View File

@@ -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());