@@ -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; |
@@ -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; |
@@ -680,7 +680,8 @@ |
||
| 680 | 680 | { |
| 681 | 681 | try { |
| 682 | 682 | return midcom_db_person::get_cached($id); |
| 683 | - } catch (midcom_error $e) { |
|
| 683 | + } |
|
| 684 | + catch (midcom_error $e) { |
|
| 684 | 685 | return false; |
| 685 | 686 | } |
| 686 | 687 | } |
@@ -74,7 +74,8 @@ |
||
| 74 | 74 | $config = new midcom_services_rcs_config($config); |
| 75 | 75 | $config->test_rcs_config(); |
| 76 | 76 | $this->add("MidCOM RCS", self::OK); |
| 77 | - } catch (midcom_error $e) { |
|
| 77 | + } |
|
| 78 | + catch (midcom_error $e) { |
|
| 78 | 79 | $this->add("MidCOM RCS", self::ERROR, $e->getMessage()); |
| 79 | 80 | } |
| 80 | 81 | } else { |
@@ -145,7 +145,8 @@ |
||
| 145 | 145 | if (is_null($this->__cached_object)) { |
| 146 | 146 | try { |
| 147 | 147 | $this->__cached_object = midcom::get()->dbfactory->get_object_by_guid($this->objectguid); |
| 148 | - } catch (midcom_error $e) { |
|
| 148 | + } |
|
| 149 | + catch (midcom_error $e) { |
|
| 149 | 150 | return false; |
| 150 | 151 | } |
| 151 | 152 | } |
@@ -181,7 +181,8 @@ |
||
| 181 | 181 | } else { |
| 182 | 182 | try { |
| 183 | 183 | $root_node = midcom_db_topic::get_cached($guid); |
| 184 | - } catch (midcom_error $e) { |
|
| 184 | + } |
|
| 185 | + catch (midcom_error $e) { |
|
| 185 | 186 | if ($e instanceof midcom_error_forbidden) { |
| 186 | 187 | throw $e; |
| 187 | 188 | } |
@@ -117,7 +117,8 @@ |
||
| 117 | 117 | } |
| 118 | 118 | break; |
| 119 | 119 | } |
| 120 | - } catch (midcom_error $e) { |
|
| 120 | + } |
|
| 121 | + catch (midcom_error $e) { |
|
| 121 | 122 | $e->log(); |
| 122 | 123 | } |
| 123 | 124 | } |