@@ -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 | } |
@@ -152,7 +152,8 @@ |
||
| 152 | 152 | debug_add('person #' . $person->id . 'has no email address, aborting'); |
| 153 | 153 | return false; |
| 154 | 154 | } |
| 155 | - } catch (midcom_error $e) { |
|
| 155 | + } |
|
| 156 | + catch (midcom_error $e) { |
|
| 156 | 157 | return false; |
| 157 | 158 | } |
| 158 | 159 | |
@@ -25,7 +25,8 @@ |
||
| 25 | 25 | { |
| 26 | 26 | try { |
| 27 | 27 | $viewer->register_plugin_namespace('__feeds', ['rss' => ['class' => __CLASS__]]); |
| 28 | - } catch (midcom_error $e) { |
|
| 28 | + } |
|
| 29 | + catch (midcom_error $e) { |
|
| 29 | 30 | $e->log(); |
| 30 | 31 | } |
| 31 | 32 | } |
@@ -62,7 +62,8 @@ |
||
| 62 | 62 | try { |
| 63 | 63 | $this->__object = call_user_func([$this->__midcom_class_name__, 'get_cached'], $this->__identifier); |
| 64 | 64 | return true; |
| 65 | - } catch (midcom_error $e) { |
|
| 65 | + } |
|
| 66 | + catch (midcom_error $e) { |
|
| 66 | 67 | $e->log(); |
| 67 | 68 | } |
| 68 | 69 | return false; |
@@ -553,7 +553,8 @@ |
||
| 553 | 553 | $tree = []; |
| 554 | 554 | try { |
| 555 | 555 | $children = self::get_child_objects($parent); |
| 556 | - } catch (midcom_error $e) { |
|
| 556 | + } |
|
| 557 | + catch (midcom_error $e) { |
|
| 557 | 558 | return $tree; |
| 558 | 559 | } |
| 559 | 560 | |
@@ -123,7 +123,8 @@ |
||
| 123 | 123 | $row = []; |
| 124 | 124 | try { |
| 125 | 125 | $row['person'] = org_openpsa_contacts_person_dba::get_cached($hour->person); |
| 126 | - } catch (midcom_error $e) { |
|
| 126 | + } |
|
| 127 | + catch (midcom_error $e) { |
|
| 127 | 128 | $e->log(); |
| 128 | 129 | continue; |
| 129 | 130 | } |