@@ -384,7 +384,8 @@ discard block |
||
| 384 | 384 | $value = $link->value; |
| 385 | 385 | |
| 386 | 386 | $tags[$key] = $value; |
| 387 | - } catch (midcom_error $e) { |
|
| 387 | + } |
|
| 388 | + catch (midcom_error $e) { |
|
| 388 | 389 | $e->log(); |
| 389 | 390 | } |
| 390 | 391 | } |
@@ -443,7 +444,8 @@ discard block |
||
| 443 | 444 | try { |
| 444 | 445 | $tag = net_nemein_tag_tag_dba::get_cached($link->tag); |
| 445 | 446 | $link_object_map[$link->fromGuid][$tag->tag] = $link; |
| 446 | - } catch (midcom_error $e) { |
|
| 447 | + } |
|
| 448 | + catch (midcom_error $e) { |
|
| 447 | 449 | $e->log(); |
| 448 | 450 | } |
| 449 | 451 | } |
@@ -472,7 +474,8 @@ discard block |
||
| 472 | 474 | $tmpobject = midcom::get()->dbfactory->convert_midgard_to_midcom($tmpobject); |
| 473 | 475 | } |
| 474 | 476 | $return[] = $tmpobject; |
| 475 | - } catch (midcom_error $e) { |
|
| 477 | + } |
|
| 478 | + catch (midcom_error $e) { |
|
| 476 | 479 | $e->log(); |
| 477 | 480 | } |
| 478 | 481 | } |
@@ -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 | |
@@ -408,7 +408,8 @@ |
||
| 408 | 408 | //Get the parent object |
| 409 | 409 | try { |
| 410 | 410 | $parent = midcom::get()->dbfactory->get_object_by_guid($this->objectguid); |
| 411 | - } catch (midcom_error $e) { |
|
| 411 | + } |
|
| 412 | + catch (midcom_error $e) { |
|
| 412 | 413 | $e->log(); |
| 413 | 414 | return false; |
| 414 | 415 | } |
@@ -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)) { |
@@ -52,7 +52,8 @@ |
||
| 52 | 52 | } elseif (!empty($this->data[MIDCOM_NAV_GUID])) { |
| 53 | 53 | try { |
| 54 | 54 | $this->data[MIDCOM_NAV_OBJECT] = midcom::get()->dbfactory->get_object_by_guid($this->data[MIDCOM_NAV_GUID]); |
| 55 | - } catch (midcom_error $e) { |
|
| 55 | + } |
|
| 56 | + catch (midcom_error $e) { |
|
| 56 | 57 | } |
| 57 | 58 | } else { |
| 58 | 59 | debug_add("Warning: The leaf {$this->leafid} of topic {$topic->id} does set neither a GUID nor an 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 | |
@@ -69,7 +69,8 @@ |
||
| 69 | 69 | // Use the DB Factory to resolve the class and to get the object |
| 70 | 70 | try { |
| 71 | 71 | $object = midcom::get()->dbfactory->get_object_by_guid($identifier); |
| 72 | - } catch (midcom_error $e) { |
|
| 72 | + } |
|
| 73 | + catch (midcom_error $e) { |
|
| 73 | 74 | // This is probably a pseudo leaf, store the score to the current node |
| 74 | 75 | $this->_topic->set_parameter('midcom.helper.nav.score', $identifier, $score); |
| 75 | 76 | return true; |
@@ -132,7 +132,8 @@ |
||
| 132 | 132 | && $nodeobject = $nav->get_node($node->id)) { |
| 133 | 133 | $napobject = $nav->get_leaf($nodeobject[MIDCOM_NAV_ID] . '-' . $object->id); |
| 134 | 134 | } |
| 135 | - } catch (midcom_error $e) { |
|
| 135 | + } |
|
| 136 | + catch (midcom_error $e) { |
|
| 136 | 137 | $e->log(); |
| 137 | 138 | } |
| 138 | 139 | return $napobject; |