@@ -269,7 +269,8 @@ |
||
| 269 | 269 | $guid = $mc_parameter->get_subkey($parameter_key, 'parentguid'); |
| 270 | 270 | try { |
| 271 | 271 | $parent = midcom::get()->dbfactory->get_object_by_guid($guid); |
| 272 | - } catch (midcom_error $e) { |
|
| 272 | + } |
|
| 273 | + catch (midcom_error $e) { |
|
| 273 | 274 | $e->log(); |
| 274 | 275 | continue; |
| 275 | 276 | } |
@@ -59,7 +59,8 @@ discard block |
||
| 59 | 59 | { |
| 60 | 60 | try { |
| 61 | 61 | $person = new org_openpsa_contacts_person_dba($member->person); |
| 62 | - } catch (midcom_error $e) { |
|
| 62 | + } |
|
| 63 | + catch (midcom_error $e) { |
|
| 63 | 64 | $e->log(); |
| 64 | 65 | return; |
| 65 | 66 | } |
@@ -82,7 +83,8 @@ discard block |
||
| 82 | 83 | $row['organization_member'] = $membership; |
| 83 | 84 | try { |
| 84 | 85 | $row['organization'] = org_openpsa_contacts_group_dba::get_cached($membership->gid); |
| 85 | - } catch (midcom_error $e) { |
|
| 86 | + } |
|
| 87 | + catch (midcom_error $e) { |
|
| 86 | 88 | debug_add("Error fetching org_openpsa_contacts_group_dba #{$membership->gid}, skipping", MIDCOM_LOG_WARN); |
| 87 | 89 | continue; |
| 88 | 90 | } |
@@ -142,7 +142,8 @@ |
||
| 142 | 142 | try { |
| 143 | 143 | $person = org_openpsa_contacts_person_dba::get_cached($link->person); |
| 144 | 144 | $segment = $person->get_parameter('org.openpsa.directmarketing.segments', $segmentation_param); |
| 145 | - } catch (midcom_error $e) { |
|
| 145 | + } |
|
| 146 | + catch (midcom_error $e) { |
|
| 146 | 147 | } |
| 147 | 148 | if (empty($segment)) { |
| 148 | 149 | $segment = $this->_l10n->get('no segment'); |
@@ -300,7 +300,8 @@ |
||
| 300 | 300 | $organization = $this->_import_subscribers_organization($subscriber); |
| 301 | 301 | $this->_import_subscribers_organization_member($subscriber, $person, $organization); |
| 302 | 302 | } |
| 303 | - } catch (midcom_error $e) { |
|
| 303 | + } |
|
| 304 | + catch (midcom_error $e) { |
|
| 304 | 305 | $e->log(); |
| 305 | 306 | // Clean up possibly created data |
| 306 | 307 | $this->_clean_new_objects(); |
@@ -48,7 +48,8 @@ |
||
| 48 | 48 | |
| 49 | 49 | try { |
| 50 | 50 | $interface = \midcom::get()->componentloader->get_interface_class($this->component); |
| 51 | - } catch (\midcom_error $e) { |
|
| 51 | + } |
|
| 52 | + catch (\midcom_error $e) { |
|
| 52 | 53 | debug_add("Failed to load the component {$this->component}: " . $e->getMessage(), MIDCOM_LOG_INFO); |
| 53 | 54 | return; |
| 54 | 55 | } |
@@ -37,7 +37,8 @@ |
||
| 37 | 37 | foreach ($items as $identifier => $guid) { |
| 38 | 38 | try { |
| 39 | 39 | $results[$identifier] = new midcom_db_attachment($guid); |
| 40 | - } catch (midcom_error $e) { |
|
| 40 | + } |
|
| 41 | + catch (midcom_error $e) { |
|
| 41 | 42 | $e->log(); |
| 42 | 43 | } |
| 43 | 44 | } |
@@ -218,7 +218,8 @@ |
||
| 218 | 218 | if ($this->_config->get('comments_topic')) { |
| 219 | 219 | try { |
| 220 | 220 | $comments_topic = new midcom_db_topic($this->_config->get('comments_topic')); |
| 221 | - } catch (midcom_error $e) { |
|
| 221 | + } |
|
| 222 | + catch (midcom_error $e) { |
|
| 222 | 223 | return false; |
| 223 | 224 | } |
| 224 | 225 | |
@@ -77,7 +77,8 @@ discard block |
||
| 77 | 77 | // if the property useContactAddress is set |
| 78 | 78 | $billing_data[0]->set_address(); |
| 79 | 79 | return $billing_data[0]; |
| 80 | - } catch (midcom_error $e) { |
|
| 80 | + } |
|
| 81 | + catch (midcom_error $e) { |
|
| 81 | 82 | $e->log(); |
| 82 | 83 | return false; |
| 83 | 84 | } |
@@ -122,10 +123,12 @@ discard block |
||
| 122 | 123 | { |
| 123 | 124 | try { |
| 124 | 125 | return new org_openpsa_contacts_person_dba($this->linkGuid); |
| 125 | - } catch (midcom_error $e) { |
|
| 126 | + } |
|
| 127 | + catch (midcom_error $e) { |
|
| 126 | 128 | try { |
| 127 | 129 | return new org_openpsa_contacts_group_dba($this->linkGuid); |
| 128 | - } catch (midcom_error $e) { |
|
| 130 | + } |
|
| 131 | + catch (midcom_error $e) { |
|
| 129 | 132 | debug_add("Failed to load contact with GUID: " . $this->linkGuid . " - last error:" . $e->getMessage(), MIDCOM_LOG_ERROR); |
| 130 | 133 | return false; |
| 131 | 134 | } |
@@ -48,7 +48,8 @@ |
||
| 48 | 48 | try { |
| 49 | 49 | $pdf_helper->render_and_attach(); |
| 50 | 50 | return $this->reply(true, $this->_l10n->get('pdf created')); |
| 51 | - } catch (midcom_error $e) { |
|
| 51 | + } |
|
| 52 | + catch (midcom_error $e) { |
|
| 52 | 53 | return $this->reply(false, $this->_l10n->get('pdf creation failed') . ': ' . $e->getMessage()); |
| 53 | 54 | } |
| 54 | 55 | } |