@@ -49,7 +49,8 @@ discard block |
||
49 | 49 | try { |
50 | 50 | $deliverable = org_openpsa_sales_salesproject_deliverable_dba::get_cached($task->get_agreement()); |
51 | 51 | $item->deliverable = $deliverable->id; |
52 | - } catch (midcom_error $e) { |
|
52 | + } |
|
53 | + catch (midcom_error $e) { |
|
53 | 54 | $e->log(); |
54 | 55 | } |
55 | 56 | $item->invoice = $invoice->id; |
@@ -121,7 +122,8 @@ discard block |
||
121 | 122 | $customer = org_openpsa_contacts_group_dba::get_cached($customer_id); |
122 | 123 | $data['customer_label'] = $customer->official; |
123 | 124 | $data['disabled'] = ''; |
124 | - } catch (midcom_error) { |
|
125 | + } |
|
126 | + catch (midcom_error) { |
|
125 | 127 | $data['customer_label'] = $this->_l10n->get('no customer'); |
126 | 128 | $data['disabled'] = ' disabled="disabled"'; |
127 | 129 | } |
@@ -144,7 +146,8 @@ discard block |
||
144 | 146 | } else { |
145 | 147 | $data['invoiceable_units'] = $task->plannedHours; |
146 | 148 | } |
147 | - } catch (midcom_error $e) { |
|
149 | + } |
|
150 | + catch (midcom_error $e) { |
|
148 | 151 | $e->log(); |
149 | 152 | if ($this->_config->get('default_hourly_price')) { |
150 | 153 | $data['default_price'] = $this->_config->get('default_hourly_price'); |
@@ -87,7 +87,8 @@ discard block |
||
87 | 87 | $customer = org_openpsa_contacts_group_dba::get_cached($invoice->customer); |
88 | 88 | $entry['customer'] = "<a href=\"{$this->router->generate('list_customer_all', ['guid' => $customer->guid])}\">" . $customer->get_label() . "</a>"; |
89 | 89 | $entry['index_customer'] = $customer->get_label(); |
90 | - } catch (midcom_error) { |
|
90 | + } |
|
91 | + catch (midcom_error) { |
|
91 | 92 | $entry['customer'] = ''; |
92 | 93 | $entry['index_customer'] = ''; |
93 | 94 | } |
@@ -101,7 +102,8 @@ discard block |
||
101 | 102 | $entry['contact'] = "<a href=\"{$this->router->generate('list_customer_all', ['guid' => $contact->guid])}\">" . $contact->get_label() . "</a>"; |
102 | 103 | $entry['contact'] = $contact_widget->show_inline(); |
103 | 104 | $entry['index_contact'] = $contact->get_label(); |
104 | - } catch (midcom_error) { |
|
105 | + } |
|
106 | + catch (midcom_error) { |
|
105 | 107 | $entry['contact'] = ''; |
106 | 108 | $entry['index_contact'] = ''; |
107 | 109 | } |
@@ -248,7 +250,8 @@ discard block |
||
248 | 250 | { |
249 | 251 | try { |
250 | 252 | $this->_customer = new org_openpsa_contacts_group_dba($guid); |
251 | - } catch (midcom_error) { |
|
253 | + } |
|
254 | + catch (midcom_error) { |
|
252 | 255 | $this->_customer = new org_openpsa_contacts_person_dba($guid); |
253 | 256 | } |
254 | 257 | $data['customer'] = $this->_customer; |
@@ -21,7 +21,8 @@ |
||
21 | 21 | $original = new midcom_db_attachment($image->attachment); |
22 | 22 | $original_url = midcom_db_attachment::get_url($original); |
23 | 23 | $name = $original->name; |
24 | - } catch (midcom_error) { |
|
24 | + } |
|
25 | + catch (midcom_error) { |
|
25 | 26 | $url = MIDCOM_STATIC_URL . '/stock-icons/mime/gnome-text-blank.png'; |
26 | 27 | $name = $data['l10n']->get('attachment missing'); |
27 | 28 | $original_url = ''; |
@@ -70,7 +70,8 @@ discard block |
||
70 | 70 | } else { |
71 | 71 | $entry['customer'] = $customer->official; |
72 | 72 | } |
73 | - } catch (midcom_error) { |
|
73 | + } |
|
74 | + catch (midcom_error) { |
|
74 | 75 | } |
75 | 76 | |
76 | 77 | if ($entry['status'] === 'canceled') { |
@@ -82,7 +83,8 @@ discard block |
||
82 | 83 | $entry['index_contact'] = $contact->rname; |
83 | 84 | $contact_card = org_openpsa_widgets_contact::get($invoice->customerContact); |
84 | 85 | $entry['contact'] = $contact_card->show_inline(); |
85 | - } catch (midcom_error) { |
|
86 | + } |
|
87 | + catch (midcom_error) { |
|
86 | 88 | } |
87 | 89 | |
88 | 90 | $entries[] = $entry; |
@@ -98,7 +98,8 @@ |
||
98 | 98 | $node_guid = $siteconfig->get_node_guid($component); |
99 | 99 | try { |
100 | 100 | $available_generators[$component] = midcom_db_topic::get_cached($node_guid)->get_label(); |
101 | - } catch (midcom_error) { |
|
101 | + } |
|
102 | + catch (midcom_error) { |
|
102 | 103 | debug_add("topic for component '{$component}' not found or accessible"); |
103 | 104 | } |
104 | 105 | } |
@@ -132,7 +132,8 @@ |
||
132 | 132 | && $deliverable->end > $this->_request_data['start'])) { |
133 | 133 | $invoices = array_merge($invoices, $this->_get_invoices_for_subscription($deliverable, $at_entry)); |
134 | 134 | } |
135 | - } catch (midcom_error) { |
|
135 | + } |
|
136 | + catch (midcom_error) { |
|
136 | 137 | } |
137 | 138 | } |
138 | 139 | $invoices = array_merge($invoices, $this->_get_deliverable_invoices()); |
@@ -25,7 +25,8 @@ |
||
25 | 25 | $row['creator_index'] = $creator->rname; |
26 | 26 | $creator_card = org_openpsa_widgets_contact::get($entry->metadata->creator); |
27 | 27 | $row['creator'] = $creator_card->show_inline(); |
28 | - } catch (midcom_error) { |
|
28 | + } |
|
29 | + catch (midcom_error) { |
|
29 | 30 | $row['creator_index'] = ''; |
30 | 31 | $row['creator'] = ''; |
31 | 32 | } |
@@ -25,7 +25,8 @@ |
||
25 | 25 | try { |
26 | 26 | midcom::get()->dbfactory->get_object_by_guid($result->fromGuid); |
27 | 27 | midcom::get()->dbfactory->get_object_by_guid($result->toGuid); |
28 | - } catch (midcom_error) { |
|
28 | + } |
|
29 | + catch (midcom_error) { |
|
29 | 30 | echo $i . "/" . $total . ": Deleting relatedto #" . $result->id . "\n"; |
30 | 31 | $result->delete(); |
31 | 32 | } |
@@ -107,7 +107,8 @@ discard block |
||
107 | 107 | //TODO: check for duplicates ? |
108 | 108 | try { |
109 | 109 | $result = ['other_obj' => midcom::get()->dbfactory->get_object_by_guid($link[$other . 'Guid'])]; |
110 | - } catch (midcom_error) { |
|
110 | + } |
|
111 | + catch (midcom_error) { |
|
111 | 112 | continue; |
112 | 113 | } |
113 | 114 | $result['link'] = [ |
@@ -378,7 +379,8 @@ discard block |
||
378 | 379 | if (!($this->_object instanceof org_openpsa_relatedto_dba)) { |
379 | 380 | $response['status'] = "method requires guid of a link object as an argument"; |
380 | 381 | } |
381 | - } catch (midcom_error $e) { |
|
382 | + } |
|
383 | + catch (midcom_error $e) { |
|
382 | 384 | $response['status'] = "error: " . $e->getMessage(); |
383 | 385 | } |
384 | 386 | |
@@ -399,7 +401,8 @@ discard block |
||
399 | 401 | $relation = new org_openpsa_relatedto_dba($guid); |
400 | 402 | $result = $relation->delete(); |
401 | 403 | $status = 'Last message: ' . midcom_connection::get_error_string(); |
402 | - } catch (midcom_error $e) { |
|
404 | + } |
|
405 | + catch (midcom_error $e) { |
|
403 | 406 | $result = false; |
404 | 407 | $status = "Object '{$guid}' could not be loaded, error:" . $e->getMessage(); |
405 | 408 | } |