@@ -7,7 +7,8 @@ |
||
| 7 | 7 | try { |
| 8 | 8 | $person = new midcom_db_person($metadata->locker); |
| 9 | 9 | $name = $person->name; |
| 10 | -} catch (midcom_error $e) { |
|
| 10 | +} |
|
| 11 | +catch (midcom_error $e) { |
|
| 11 | 12 | $name = $l10n_midcom->get('unknown user'); |
| 12 | 13 | $e->log(); |
| 13 | 14 | } |
@@ -12,7 +12,8 @@ |
||
| 12 | 12 | foreach ($data['wikilinks'] as $link) { |
| 13 | 13 | try { |
| 14 | 14 | $page = new net_nemein_wiki_wikipage($link->frompage); |
| 15 | - } catch (midcom_error $e) { |
|
| 15 | + } |
|
| 16 | + catch (midcom_error $e) { |
|
| 16 | 17 | $e->log(); |
| 17 | 18 | continue; |
| 18 | 19 | } |
@@ -35,7 +35,8 @@ |
||
| 35 | 35 | try { |
| 36 | 36 | $article = new midcom_db_article($related); |
| 37 | 37 | echo "<li><a href=\"" . midcom::get()->permalinks->create_permalink($article->guid) . "\">{$article->title}</a></li>\n"; |
| 38 | - } catch (midcom_error $e) { |
|
| 38 | + } |
|
| 39 | + catch (midcom_error $e) { |
|
| 39 | 40 | $e->log(); |
| 40 | 41 | } |
| 41 | 42 | } |
@@ -33,7 +33,8 @@ |
||
| 33 | 33 | $reporter_card = new org_openpsa_widgets_contact($reporter); |
| 34 | 34 | $entry['index_reporter'] = $reporter->rname; |
| 35 | 35 | $entry['reporter'] = $reporter_card->show_inline(); |
| 36 | - } catch (midcom_error $e) { |
|
| 36 | + } |
|
| 37 | + catch (midcom_error $e) { |
|
| 37 | 38 | $e->log(); |
| 38 | 39 | $entry['index_reporter'] = ''; |
| 39 | 40 | $entry['reporter'] = ''; |
@@ -17,7 +17,8 @@ |
||
| 17 | 17 | try { |
| 18 | 18 | $group = org_openpsa_products_product_group_dba::get_cached($product['productGroup']); |
| 19 | 19 | $desc .= $group->title . ', '; |
| 20 | - } catch (midcom_error $e) { |
|
| 20 | + } |
|
| 21 | + catch (midcom_error $e) { |
|
| 21 | 22 | $e->log(); |
| 22 | 23 | } |
| 23 | 24 | if ($product['delivery'] == org_openpsa_products_product_dba::DELIVERY_SINGLE) { |
@@ -61,7 +61,8 @@ |
||
| 61 | 61 | try { |
| 62 | 62 | ?>&(data['code']:p);<?php |
| 63 | 63 | |
| 64 | - } catch (Exception $e) { |
|
| 64 | + } |
|
| 65 | + catch (Exception $e) { |
|
| 65 | 66 | echo '<div class="shell-error">' . $e->getMessage() . '</div>'; |
| 66 | 67 | echo htmlentities($e->getTraceAsString()); |
| 67 | 68 | } |
@@ -4,7 +4,8 @@ |
||
| 4 | 4 | |
| 5 | 5 | try { |
| 6 | 6 | $topic = midcom_db_topic::get_cached($document->topic_guid); |
| 7 | -} catch (midcom_error $e) { |
|
| 7 | +} |
|
| 8 | +catch (midcom_error $e) { |
|
| 8 | 9 | $e->log(); |
| 9 | 10 | } |
| 10 | 11 | ?> |
@@ -182,7 +182,8 @@ discard block |
||
| 182 | 182 | } |
| 183 | 183 | try { |
| 184 | 184 | $this->_storage = new $person_class($id); |
| 185 | - } catch (mgd_exception $e) { |
|
| 185 | + } |
|
| 186 | + catch (mgd_exception $e) { |
|
| 186 | 187 | debug_add("Failed to retrieve the person ID {$id}: " . $e->getMessage(), MIDCOM_LOG_INFO); |
| 187 | 188 | throw new midcom_error_midgard($e, $id); |
| 188 | 189 | } |
@@ -230,7 +231,8 @@ discard block |
||
| 230 | 231 | if (mgd_is_guid($id)) { |
| 231 | 232 | try { |
| 232 | 233 | return new $person_class($id); |
| 233 | - } catch (mgd_exception $e) { |
|
| 234 | + } |
|
| 235 | + catch (mgd_exception $e) { |
|
| 234 | 236 | debug_add("Failed to retrieve the person GUID {$id}: " . $e->getMessage(), MIDCOM_LOG_INFO); |
| 235 | 237 | throw new midcom_error_midgard($e, $id); |
| 236 | 238 | } |
@@ -93,7 +93,8 @@ |
||
| 93 | 93 | try { |
| 94 | 94 | $mgdschemaclass = $this->__mgdschema_class_name__; |
| 95 | 95 | $this->__object = new $mgdschemaclass($id); |
| 96 | - } catch (mgd_exception $e) { |
|
| 96 | + } |
|
| 97 | + catch (mgd_exception $e) { |
|
| 97 | 98 | debug_add('Constructing ' . $this->__mgdschema_class_name__ . ' object ' . $id . ' failed, reason: ' . $e->getMessage(), MIDCOM_LOG_WARN); |
| 98 | 99 | throw new midcom_error_midgard($e, $id); |
| 99 | 100 | } |