@@ -217,7 +217,8 @@ |
||
| 217 | 217 | |
| 218 | 218 | try { |
| 219 | 219 | $account = new midcom_core_account($person); |
| 220 | - } catch (midcom_error $e) { |
|
| 220 | + } |
|
| 221 | + catch (midcom_error $e) { |
|
| 221 | 222 | midcom::get()->uimessages->add($this->_l10n->get('midgard.admin.user'), sprintf($this->_l10n->get('failed to get the user with id %s'), $person->id), 'error'); |
| 222 | 223 | return; |
| 223 | 224 | } |
@@ -171,7 +171,8 @@ |
||
| 171 | 171 | //create reflector with linked object to get the right label |
| 172 | 172 | try { |
| 173 | 173 | $linked_object = midcom::get()->dbfactory->get_object_by_guid($entry->linkGuid); |
| 174 | - } catch (midcom_error $e) { |
|
| 174 | + } |
|
| 175 | + catch (midcom_error $e) { |
|
| 175 | 176 | unset($data['entries'][$i]); |
| 176 | 177 | $e->log(); |
| 177 | 178 | continue; |
@@ -92,7 +92,8 @@ |
||
| 92 | 92 | $customer = new org_openpsa_contacts_group_dba($customer_id); |
| 93 | 93 | $customer_label = $customer->official; |
| 94 | 94 | $customer = $customer_id; |
| 95 | - } catch (midcom_error $e) { |
|
| 95 | + } |
|
| 96 | + catch (midcom_error $e) { |
|
| 96 | 97 | } |
| 97 | 98 | } |
| 98 | 99 | } |
@@ -52,7 +52,8 @@ |
||
| 52 | 52 | // TODO: Should we sudo here to ensure getting correct prefs regardless of ACLs? |
| 53 | 53 | try { |
| 54 | 54 | $recipient = midcom_db_person::get_cached($recipient); |
| 55 | - } catch (midcom_error $e) { |
|
| 55 | + } |
|
| 56 | + catch (midcom_error $e) { |
|
| 56 | 57 | return false; |
| 57 | 58 | } |
| 58 | 59 | |
@@ -126,7 +126,8 @@ |
||
| 126 | 126 | $salesproject = org_openpsa_sales_salesproject_dba::get_cached($this->_deliverable->salesproject); |
| 127 | 127 | try { |
| 128 | 128 | $owner = midcom_db_person::get_cached($salesproject->owner); |
| 129 | - } catch (midcom_error $e) { |
|
| 129 | + } |
|
| 130 | + catch (midcom_error $e) { |
|
| 130 | 131 | $e->log(); |
| 131 | 132 | return; |
| 132 | 133 | } |
@@ -134,7 +134,8 @@ discard block |
||
| 134 | 134 | |
| 135 | 135 | try { |
| 136 | 136 | $deliverable = new org_openpsa_sales_salesproject_deliverable_dba($args['deliverable']); |
| 137 | - } catch (midcom_error $e) { |
|
| 137 | + } |
|
| 138 | + catch (midcom_error $e) { |
|
| 138 | 139 | $handler->print_error("Deliverable {$args['deliverable']} not found: " . midcom_connection::get_error_string()); |
| 139 | 140 | return false; |
| 140 | 141 | } |
@@ -158,7 +159,8 @@ discard block |
||
| 158 | 159 | } |
| 159 | 160 | try { |
| 160 | 161 | $deliverable = new org_openpsa_sales_salesproject_deliverable_dba($args['deliverable']); |
| 161 | - } catch (midcom_error $e) { |
|
| 162 | + } |
|
| 163 | + catch (midcom_error $e) { |
|
| 162 | 164 | $handler->print_error('no deliverable with passed GUID: ' . $args['deliverable'] . ', aborting'); |
| 163 | 165 | return false; |
| 164 | 166 | } |
@@ -166,7 +168,8 @@ discard block |
||
| 166 | 168 | //get the owner of the salesproject the deliverable belongs to |
| 167 | 169 | try { |
| 168 | 170 | $project = new org_openpsa_sales_salesproject_dba($deliverable->salesproject); |
| 169 | - } catch (midcom_error $e) { |
|
| 171 | + } |
|
| 172 | + catch (midcom_error $e) { |
|
| 170 | 173 | $handler->print_error('Failed to load salesproject: ' . $e->getMessage()); |
| 171 | 174 | return false; |
| 172 | 175 | } |
@@ -51,7 +51,8 @@ |
||
| 51 | 51 | } |
| 52 | 52 | try { |
| 53 | 53 | $this->_request_data['product'] = org_openpsa_products_product_dba::get_cached($this->_deliverable->product); |
| 54 | - } catch (midcom_error $e) { |
|
| 54 | + } |
|
| 55 | + catch (midcom_error $e) { |
|
| 55 | 56 | $this->_request_data['product'] = false; |
| 56 | 57 | } |
| 57 | 58 | } |
@@ -113,7 +113,8 @@ |
||
| 113 | 113 | try { |
| 114 | 114 | $this->_request_data['customer'] = new org_openpsa_contacts_group_dba($guid); |
| 115 | 115 | $qb->add_constraint('customer', '=', $this->_request_data['customer']->id); |
| 116 | - } catch (midcom_error $e) { |
|
| 116 | + } |
|
| 117 | + catch (midcom_error $e) { |
|
| 117 | 118 | $this->_request_data['customer'] = new org_openpsa_contacts_person_dba($guid); |
| 118 | 119 | $qb->add_constraint('customerContact', '=', $this->_request_data['customer']->id); |
| 119 | 120 | } |
@@ -159,7 +159,8 @@ |
||
| 159 | 159 | |
| 160 | 160 | try { |
| 161 | 161 | $object = new $classname($guid); |
| 162 | - } catch (midcom_error $e) { |
|
| 162 | + } |
|
| 163 | + catch (midcom_error $e) { |
|
| 163 | 164 | $handler->print_error($type . " {$guid} not found, error " . $e->getMessage()); |
| 164 | 165 | return false; |
| 165 | 166 | } |