mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-09 19:13:26 +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());
|
||||
|
@@ -850,7 +850,7 @@ class module_report
|
||||
$this->setReport();
|
||||
|
||||
return $this->report;
|
||||
} catch (Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
echo $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
@@ -80,7 +80,7 @@ class module_report_add extends module_report
|
||||
try {
|
||||
$user = User_Adapter::getInstance($value, $this->app);
|
||||
$caption = $user->get_display_name();
|
||||
} catch (Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
} elseif ($field == 'date')
|
||||
|
@@ -328,7 +328,7 @@ class module_report_dashboard implements module_report_dashboard_componentInterf
|
||||
$this->app, $sbasid, $coll, $this->dmin, $this->dmax
|
||||
);
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
$i ++;
|
||||
|
@@ -76,7 +76,7 @@ class module_report_dashboard_feed implements module_report_dashboard_componentI
|
||||
$result->setApplication($app);
|
||||
|
||||
return $result;
|
||||
} catch (Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
|
||||
|
@@ -114,7 +114,7 @@ class module_report_download extends module_report
|
||||
if (array_key_exists('record_id', $row)) {
|
||||
try {
|
||||
$record = new \record_adapter($app, $this->sbas_id, $row['record_id']);
|
||||
} catch (Exception_Record_AdapterNotFound $e) {
|
||||
} catch (\Exception_Record_AdapterNotFound $e) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@@ -80,7 +80,7 @@ class module_report_edit extends module_report
|
||||
try {
|
||||
$user = User_Adapter::getInstance($value, $this->app);
|
||||
$caption = $user->get_display_name();
|
||||
} catch (Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
} elseif ($field == 'date') {
|
||||
|
@@ -498,7 +498,7 @@ class module_report_nav extends module_report
|
||||
|
||||
try {
|
||||
$record = new record_adapter($this->app, $sbas_id, $rid);
|
||||
} catch (Exception_Record_AdapterNotFound $e) {
|
||||
} catch (\Exception_Record_AdapterNotFound $e) {
|
||||
return $this->report;
|
||||
}
|
||||
|
||||
|
@@ -81,7 +81,7 @@ class module_report_push extends module_report
|
||||
try {
|
||||
$user = User_Adapter::getInstance($value, $this->app);
|
||||
$caption = $user->get_display_name();
|
||||
} catch (Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
} elseif ($field == 'date') {
|
||||
|
@@ -81,7 +81,7 @@ class module_report_sent extends module_report
|
||||
try {
|
||||
$user = User_Adapter::getInstance($value, $this->app);
|
||||
$caption = $user->get_display_name();
|
||||
} catch (Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
} elseif ($field == 'date') {
|
||||
|
@@ -81,7 +81,7 @@ class module_report_validate extends module_report
|
||||
try {
|
||||
$user = User_Adapter::getInstance($value, $this->app);
|
||||
$caption = $user->get_display_name();
|
||||
} catch (Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
} elseif ($field == 'date') {
|
||||
|
Reference in New Issue
Block a user