@@ -175,7 +175,8 @@ |
||
| 175 | 175 | { |
| 176 | 176 | try { |
| 177 | 177 | $session = new midcom_core_login_session_db($sessionid); |
| 178 | - } catch (Exception $e) { |
|
| 178 | + } |
|
| 179 | + catch (Exception $e) { |
|
| 179 | 180 | debug_add('Login session ' . $sessionid . ' failed to load: ' . $e->getMessage(), MIDCOM_LOG_INFO); |
| 180 | 181 | return false; |
| 181 | 182 | } |
@@ -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 | } |
@@ -405,7 +405,8 @@ |
||
| 405 | 405 | |
| 406 | 406 | try { |
| 407 | 407 | $this->_check_config($config); |
| 408 | - } catch (Exception $e) { |
|
| 408 | + } |
|
| 409 | + catch (Exception $e) { |
|
| 409 | 410 | midcom::get()->uimessages->add( |
| 410 | 411 | $this->_l10n_midcom->get('component configuration'), |
| 411 | 412 | sprintf($this->_l10n->get('configuration save failed: %s'), $e->getMessage()), |
@@ -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 | } |
@@ -217,7 +217,8 @@ |
||
| 217 | 217 | |
| 218 | 218 | try { |
| 219 | 219 | $account = new midcom_core_account($person); |
| 220 | - } catch (midcom_error $e) { |
|
| 220 | + } |
|
| 221 | + catch (midcom_error $e) { |
|
| 221 | 222 | midcom::get()->uimessages->add($this->_l10n->get('midgard.admin.user'), sprintf($this->_l10n->get('failed to get the user with id %s'), $person->id), 'error'); |
| 222 | 223 | return; |
| 223 | 224 | } |
@@ -356,7 +356,8 @@ |
||
| 356 | 356 | // The agreement allows invoicing only approved hours, therefore don't mark unapproved |
| 357 | 357 | $qb->add_constraint('metadata.isapproved', '=', true); |
| 358 | 358 | } |
| 359 | - } catch (midcom_error $e) { |
|
| 359 | + } |
|
| 360 | + catch (midcom_error $e) { |
|
| 360 | 361 | $e->log(); |
| 361 | 362 | } |
| 362 | 363 | |
@@ -121,7 +121,8 @@ discard block |
||
| 121 | 121 | ); |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | - } catch (midcom_error $e) { |
|
| 124 | + } |
|
| 125 | + catch (midcom_error $e) { |
|
| 125 | 126 | } |
| 126 | 127 | } |
| 127 | 128 | |
@@ -151,7 +152,8 @@ discard block |
||
| 151 | 152 | // This task is to be connected to a project |
| 152 | 153 | try { |
| 153 | 154 | $this->_parent = new org_openpsa_projects_project($args[1]); |
| 154 | - } catch (midcom_error $e) { |
|
| 155 | + } |
|
| 156 | + catch (midcom_error $e) { |
|
| 155 | 157 | return false; |
| 156 | 158 | } |
| 157 | 159 | |
@@ -163,7 +165,8 @@ discard block |
||
| 163 | 165 | } elseif ($this->_mode == 'delete') { |
| 164 | 166 | try { |
| 165 | 167 | $this->_parent = new org_openpsa_projects_project($this->_object->project); |
| 166 | - } catch (midcom_error $e) { |
|
| 168 | + } |
|
| 169 | + catch (midcom_error $e) { |
|
| 167 | 170 | $e->log(); |
| 168 | 171 | } |
| 169 | 172 | } |