@@ -103,7 +103,8 @@ |
||
| 103 | 103 | try { |
| 104 | 104 | midcom_db_topic::get_cached($node_guid); |
| 105 | 105 | $available_generators[$component] = midcom::get()->i18n->get_string($component, $component); |
| 106 | - } catch (midcom_error $e) { |
|
| 106 | + } |
|
| 107 | + catch (midcom_error $e) { |
|
| 107 | 108 | debug_add("topic for component '{$component}' not found or accessible"); |
| 108 | 109 | } |
| 109 | 110 | } |
@@ -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; |
@@ -115,7 +115,8 @@ |
||
| 115 | 115 | MIDCOM_TOOLBAR_GLYPHICON => 'money', |
| 116 | 116 | ]; |
| 117 | 117 | } |
| 118 | - } catch (midcom_error $e) { |
|
| 118 | + } |
|
| 119 | + catch (midcom_error $e) { |
|
| 119 | 120 | } |
| 120 | 121 | } |
| 121 | 122 | |
@@ -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 | } |
@@ -48,7 +48,8 @@ discard block |
||
| 48 | 48 | if ($sales_url) { |
| 49 | 49 | $entry['deliverable'] = '<a href="' . $sales_url . 'deliverable/' . $deliverable->guid . '/">' . $entry['deliverable'] . '</a>'; |
| 50 | 50 | } |
| 51 | - } catch (midcom_error $e) { |
|
| 51 | + } |
|
| 52 | + catch (midcom_error $e) { |
|
| 52 | 53 | $entry['deliverable'] = ''; |
| 53 | 54 | } |
| 54 | 55 | try { |
@@ -57,7 +58,8 @@ discard block |
||
| 57 | 58 | if ($projects_url) { |
| 58 | 59 | $entry['task'] = '<a href="' . $projects_url . 'task/' . $task->guid . '/">' . $entry['task'] . '</a>'; |
| 59 | 60 | } |
| 60 | - } catch (midcom_error $e) { |
|
| 61 | + } |
|
| 62 | + catch (midcom_error $e) { |
|
| 61 | 63 | $entry['task'] = ''; |
| 62 | 64 | } |
| 63 | 65 | |
@@ -195,7 +195,8 @@ discard block |
||
| 195 | 195 | try { |
| 196 | 196 | $event = new org_openpsa_calendar_event_dba($member->event); |
| 197 | 197 | $set_as_modified = true; |
| 198 | - } catch (midcom_error $e) { |
|
| 198 | + } |
|
| 199 | + catch (midcom_error $e) { |
|
| 199 | 200 | debug_add("event_resource #{$member->id} links to bogus event #{$member->event}, skipping and removing", MIDCOM_LOG_WARN); |
| 200 | 201 | $member->delete(); |
| 201 | 202 | return; |
@@ -223,7 +224,8 @@ discard block |
||
| 223 | 224 | |
| 224 | 225 | try { |
| 225 | 226 | $event = new org_openpsa_calendar_event_dba($member->eid); |
| 226 | - } catch (midcom_error $e) { |
|
| 227 | + } |
|
| 228 | + catch (midcom_error $e) { |
|
| 227 | 229 | debug_add("eventmember #{$member->id} links to bogus event #{$member->eid}, skipping and removing", MIDCOM_LOG_WARN); |
| 228 | 230 | $member->delete(); |
| 229 | 231 | return; |
@@ -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); |