@@ -98,7 +98,8 @@ |
||
| 98 | 98 | if ($this->old_task) { |
| 99 | 99 | self::update_cache(new org_openpsa_projects_task_dba($this->old_task)); |
| 100 | 100 | } |
| 101 | - } catch (midcom_error $e) { |
|
| 101 | + } |
|
| 102 | + catch (midcom_error $e) { |
|
| 102 | 103 | $e->log(); |
| 103 | 104 | } |
| 104 | 105 | |
@@ -48,7 +48,8 @@ |
||
| 48 | 48 | foreach (array_unique($tasks_to_update) as $id) { |
| 49 | 49 | try { |
| 50 | 50 | org_openpsa_expenses_hour_report_dba::update_cache(new org_openpsa_projects_task_dba($id)); |
| 51 | - } catch (midcom_error $e) { |
|
| 51 | + } |
|
| 52 | + catch (midcom_error $e) { |
|
| 52 | 53 | $e->log(); |
| 53 | 54 | } |
| 54 | 55 | } |
@@ -73,7 +73,8 @@ |
||
| 73 | 73 | if ($stat instanceof midcom_services_indexer_client) { |
| 74 | 74 | try { |
| 75 | 75 | $stat->reindex(); |
| 76 | - } catch (RequestException $e) { |
|
| 76 | + } |
|
| 77 | + catch (RequestException $e) { |
|
| 77 | 78 | if ($e->hasResponse()) { |
| 78 | 79 | $crawler = new Crawler($e->getResponse()->getBody()->getContents()); |
| 79 | 80 | $body = $crawler->filterXPath('//body')->html(); |
@@ -123,7 +123,8 @@ |
||
| 123 | 123 | try { |
| 124 | 124 | $this->$function($request->request, $request->files); |
| 125 | 125 | $this->response['success'] = true; |
| 126 | - } catch (midcom_error $e) { |
|
| 126 | + } |
|
| 127 | + catch (midcom_error $e) { |
|
| 127 | 128 | $this->response['success'] = false; |
| 128 | 129 | $this->response['error'] = $e->getMessage(); |
| 129 | 130 | } |
@@ -33,7 +33,8 @@ |
||
| 33 | 33 | $member->require_do('midgard:update'); |
| 34 | 34 | $member->extra = $request->request->get('title'); |
| 35 | 35 | $response['status'] = $member->update(); |
| 36 | - } catch (midcom_error $e) { |
|
| 36 | + } |
|
| 37 | + catch (midcom_error $e) { |
|
| 37 | 38 | $e->log(); |
| 38 | 39 | } |
| 39 | 40 | $response['message'] = midcom_connection::get_error_string(); |
@@ -155,7 +155,8 @@ discard block |
||
| 155 | 155 | { |
| 156 | 156 | try { |
| 157 | 157 | Locales::getName($lang); |
| 158 | - } catch (Exception $e) { |
|
| 158 | + } |
|
| 159 | + catch (Exception $e) { |
|
| 159 | 160 | debug_add("Language {$lang} not found:" . $e->getMessage(), MIDCOM_LOG_ERROR); |
| 160 | 161 | return false; |
| 161 | 162 | } |
@@ -236,7 +237,8 @@ discard block |
||
| 236 | 237 | { |
| 237 | 238 | try { |
| 238 | 239 | return $this->get_l10n($component)->get($stringid); |
| 239 | - } catch (midcom_error $e) { |
|
| 240 | + } |
|
| 241 | + catch (midcom_error $e) { |
|
| 240 | 242 | $e->log(MIDCOM_LOG_WARN); |
| 241 | 243 | return $stringid; |
| 242 | 244 | } |
@@ -46,7 +46,8 @@ discard block |
||
| 46 | 46 | $object = self::_load_backend($backend, $params); |
| 47 | 47 | debug_add('Using backend ' . $backend); |
| 48 | 48 | return $object; |
| 49 | - } catch (midcom_error $e) { |
|
| 49 | + } |
|
| 50 | + catch (midcom_error $e) { |
|
| 50 | 51 | debug_add('Failed to load backend ' . $backend . ', message:' . $e->getMessage()); |
| 51 | 52 | } |
| 52 | 53 | } |
@@ -76,7 +77,8 @@ discard block |
||
| 76 | 77 | $this->mail($message); |
| 77 | 78 | $this->error = null; |
| 78 | 79 | return true; |
| 79 | - } catch (Exception $e) { |
|
| 80 | + } |
|
| 81 | + catch (Exception $e) { |
|
| 80 | 82 | $this->error = $e->getMessage(); |
| 81 | 83 | return false; |
| 82 | 84 | } |
@@ -110,7 +110,8 @@ discard block |
||
| 110 | 110 | try { |
| 111 | 111 | $this->process_classes($rules['classes'], $rules['type']); |
| 112 | 112 | return true; |
| 113 | - } catch (midcom_error $e) { |
|
| 113 | + } |
|
| 114 | + catch (midcom_error $e) { |
|
| 114 | 115 | $e->log(); |
| 115 | 116 | return false; |
| 116 | 117 | } |
@@ -225,7 +226,8 @@ discard block |
||
| 225 | 226 | $guid = $mc_parameter->get_subkey($parameter_key, 'parentguid'); |
| 226 | 227 | try { |
| 227 | 228 | $parent = midcom::get()->dbfactory->get_object_by_guid($guid); |
| 228 | - } catch (midcom_error $e) { |
|
| 229 | + } |
|
| 230 | + catch (midcom_error $e) { |
|
| 229 | 231 | $e->log(); |
| 230 | 232 | continue; |
| 231 | 233 | } |
@@ -44,7 +44,8 @@ |
||
| 44 | 44 | { |
| 45 | 45 | try { |
| 46 | 46 | $this->cache->invalidate_all(); |
| 47 | - } catch (\Throwable $e) { |
|
| 47 | + } |
|
| 48 | + catch (\Throwable $e) { |
|
| 48 | 49 | $output->writeln($e->getMessage()); |
| 49 | 50 | } |
| 50 | 51 | |