@@ -29,7 +29,8 @@ |
||
29 | 29 | foreach ($qb->execute() as $article) { |
30 | 30 | try { |
31 | 31 | $datamanager->set_storage($article); |
32 | - } catch (midcom_error $e) { |
|
32 | + } |
|
33 | + catch (midcom_error $e) { |
|
33 | 34 | $e->log(MIDCOM_LOG_WARN); |
34 | 35 | continue; |
35 | 36 | } |
@@ -93,7 +93,8 @@ |
||
93 | 93 | // ->source will always contain the document GUID |
94 | 94 | $data['document'] = new org_openpsa_documents_document_dba($document->source); |
95 | 95 | $this->datamanager->set_storage($data['document']); |
96 | - } catch (midcom_error $e) { |
|
96 | + } |
|
97 | + catch (midcom_error $e) { |
|
97 | 98 | $e->log(); |
98 | 99 | continue; |
99 | 100 | } |
@@ -76,7 +76,8 @@ |
||
76 | 76 | } else { |
77 | 77 | try { |
78 | 78 | $this->initialize_index_article($topic); |
79 | - } catch (midcom_error $e) { |
|
79 | + } |
|
80 | + catch (midcom_error $e) { |
|
80 | 81 | // Could not create index |
81 | 82 | $topic->delete(); |
82 | 83 | throw $e; |
@@ -121,7 +121,8 @@ |
||
121 | 121 | |
122 | 122 | try { |
123 | 123 | $response = $client->send($request); |
124 | - } catch (Exception $e) { |
|
124 | + } |
|
125 | + catch (Exception $e) { |
|
125 | 126 | $this->error = $e->getMessage(); |
126 | 127 | debug_add("Got error '{$this->error}' from HTTP request", MIDCOM_LOG_INFO); |
127 | 128 | return false; |
@@ -61,7 +61,8 @@ |
||
61 | 61 | { |
62 | 62 | try { |
63 | 63 | $this->_object = midcom::get()->dbfactory->get_object_by_guid($guid); |
64 | - } catch (midcom_error $e) { |
|
64 | + } |
|
65 | + catch (midcom_error $e) { |
|
65 | 66 | if (midcom_connection::get_error() == MGD_ERR_OBJECT_DELETED) { |
66 | 67 | $relocate = $this->router->generate('object_deleted', ['guid' => $guid]); |
67 | 68 | midcom::get()->relocate($relocate); |
@@ -61,7 +61,8 @@ discard block |
||
61 | 61 | try { |
62 | 62 | $deliverable = org_openpsa_sales_salesproject_deliverable_dba::get_cached($at_entry->arguments['deliverable']); |
63 | 63 | $salesproject = org_openpsa_sales_salesproject_dba::get_cached($deliverable->salesproject); |
64 | - } catch (midcom_error $e) { |
|
64 | + } |
|
65 | + catch (midcom_error $e) { |
|
65 | 66 | $e->log(); |
66 | 67 | return $invoice; |
67 | 68 | } |
@@ -103,7 +104,8 @@ discard block |
||
103 | 104 | $invoice[$fieldname] = '<a href="' . $sales_url . 'list/customer/' . $object->guid . '/">' . $invoice[$fieldname] . '</a>'; |
104 | 105 | } |
105 | 106 | $invoice['index_' . $fieldname] = $object->get_label(); |
106 | - } catch (midcom_error $e) { |
|
107 | + } |
|
108 | + catch (midcom_error $e) { |
|
107 | 109 | $e->log(); |
108 | 110 | } |
109 | 111 | } |
@@ -72,7 +72,8 @@ |
||
72 | 72 | $data = $event->getData(); |
73 | 73 | try { |
74 | 74 | $data = $purifier->purify($data); |
75 | - } catch (\Exception $e) { |
|
75 | + } |
|
76 | + catch (\Exception $e) { |
|
76 | 77 | debug_add("HTML Purifier failed: " . $e->getMessage(), MIDCOM_LOG_WARN); |
77 | 78 | } |
78 | 79 | $event->setData($data); |
@@ -193,7 +193,8 @@ |
||
193 | 193 | |
194 | 194 | try { |
195 | 195 | $diff_fields = $rcs_handler->get_diff($prev_version, $this_version); |
196 | - } catch (midcom_error $e) { |
|
196 | + } |
|
197 | + catch (midcom_error $e) { |
|
197 | 198 | $e->log(); |
198 | 199 | return ''; |
199 | 200 | } |
@@ -138,7 +138,8 @@ |
||
138 | 138 | try { |
139 | 139 | $parent = new org_openpsa_projects_project($task->project); |
140 | 140 | $options['success_url'] = $this->router->generate('project', ['guid' => $parent->guid]); |
141 | - } catch (midcom_error $e) { |
|
141 | + } |
|
142 | + catch (midcom_error $e) { |
|
142 | 143 | $e->log(); |
143 | 144 | } |
144 | 145 |