@@ -88,7 +88,8 @@ |
||
88 | 88 | $style = midcom_db_style::get_cached($style_id); |
89 | 89 | $styleeditor_url = midcom_connection::get_url('self') . "__mfa/asgard/object/view/{$style->guid}/"; |
90 | 90 | $enabled = true; |
91 | - } catch (midcom_error $e) { |
|
91 | + } |
|
92 | + catch (midcom_error $e) { |
|
92 | 93 | $e->log(); |
93 | 94 | } |
94 | 95 | } |
@@ -4,7 +4,8 @@ |
||
4 | 4 | try { |
5 | 5 | $person = new midcom_db_person($metadata->locker); |
6 | 6 | $name = $person->name; |
7 | -} catch (midcom_error $e) { |
|
7 | +} |
|
8 | +catch (midcom_error $e) { |
|
8 | 9 | $name = $this->data['handler']->_l10n_midcom->get('unknown user'); |
9 | 10 | $e->log(); |
10 | 11 | } |
@@ -63,7 +63,8 @@ |
||
63 | 63 | |
64 | 64 | try { |
65 | 65 | $attachment = new midcom_db_attachment($guid); |
66 | - } catch (midcom_error $e) { |
|
66 | + } |
|
67 | + catch (midcom_error $e) { |
|
67 | 68 | $e->log(); |
68 | 69 | return "<span class=\"missing_photo\" title=\"{$guid}\">{$fulltag}</span>{$after}"; |
69 | 70 | } |
@@ -120,14 +120,16 @@ |
||
120 | 120 | if (!empty($this->customer)) { |
121 | 121 | try { |
122 | 122 | return org_openpsa_contacts_group_dba::get_cached($this->customer); |
123 | - } catch (midcom_error $e) { |
|
123 | + } |
|
124 | + catch (midcom_error $e) { |
|
124 | 125 | $e->log(); |
125 | 126 | } |
126 | 127 | } |
127 | 128 | if (!empty($this->customerContact)) { |
128 | 129 | try { |
129 | 130 | return org_openpsa_contacts_person_dba::get_cached($this->customerContact); |
130 | - } catch (midcom_error $e) { |
|
131 | + } |
|
132 | + catch (midcom_error $e) { |
|
131 | 133 | $e->log(); |
132 | 134 | } |
133 | 135 | } |
@@ -152,7 +152,8 @@ |
||
152 | 152 | try { |
153 | 153 | $topic = new midcom_db_topic($id); |
154 | 154 | $id = $topic->id; |
155 | - } catch (midcom_error $e) { |
|
155 | + } |
|
156 | + catch (midcom_error $e) { |
|
156 | 157 | $e->log(); |
157 | 158 | break; |
158 | 159 | } |
@@ -66,7 +66,8 @@ |
||
66 | 66 | try { |
67 | 67 | $author = new midcom_db_person($wikipage->metadata->revisor); |
68 | 68 | $item->author = $author->name; |
69 | - } catch (midcom_error $e) { |
|
69 | + } |
|
70 | + catch (midcom_error $e) { |
|
70 | 71 | $e->log(); |
71 | 72 | } |
72 | 73 |
@@ -296,7 +296,8 @@ |
||
296 | 296 | // the tree. This is, for example, used by the on-delete cache invalidation. |
297 | 297 | try { |
298 | 298 | $object = midcom::get()->dbfactory->get_object_by_guid($guid); |
299 | - } catch (midcom_error $e) { |
|
299 | + } |
|
300 | + catch (midcom_error $e) { |
|
300 | 301 | debug_add("Could not load GUID {$guid}, trying to continue anyway. Last error was: " . $e->getMessage(), MIDCOM_LOG_WARN); |
301 | 302 | } |
302 | 303 | if (!empty($object)) { |
@@ -658,7 +658,8 @@ |
||
658 | 658 | && mgd_is_guid($guid)) { |
659 | 659 | try { |
660 | 660 | $object = midcom::get()->dbfactory->get_object_by_guid($guid); |
661 | - } catch (midcom_error $e) { |
|
661 | + } |
|
662 | + catch (midcom_error $e) { |
|
662 | 663 | debug_add("Failed to create a metadata instance for the GUID {$guid}: " . $e->getMessage(), MIDCOM_LOG_WARN); |
663 | 664 | debug_print_r("Source was:", $source); |
664 | 665 |
@@ -72,7 +72,8 @@ |
||
72 | 72 | |
73 | 73 | try { |
74 | 74 | $object = midcom::get()->dbfactory->get_object_by_guid($guid); |
75 | - } catch (midcom_error $e) { |
|
75 | + } |
|
76 | + catch (midcom_error $e) { |
|
76 | 77 | debug_add("Failed to resolve the GUID {$guid}, this is most probably an access denied error.", MIDCOM_LOG_ERROR); |
77 | 78 | debug_add('Last MidCOM error string: ' . $e->getMessage()); |
78 | 79 | return null; |