@@ -42,7 +42,8 @@ |
||
| 42 | 42 | } |
| 43 | 43 | try { |
| 44 | 44 | $resource = org_openpsa_calendar_resource_dba::get_cached($this->resource); |
| 45 | - } catch (midcom_error $e) { |
|
| 45 | + } |
|
| 46 | + catch (midcom_error $e) { |
|
| 46 | 47 | debug_add("Cannot fetch resource #{$this->resource} returning false", MIDCOM_LOG_INFO); |
| 47 | 48 | return false; |
| 48 | 49 | } |
@@ -66,7 +66,8 @@ discard block |
||
| 66 | 66 | try { |
| 67 | 67 | $task = org_openpsa_projects_task_dba::get_cached($this->task); |
| 68 | 68 | $url = $projects_url . 'task/' . $task->guid . '/'; |
| 69 | - } catch (midcom_error $e) { |
|
| 69 | + } |
|
| 70 | + catch (midcom_error $e) { |
|
| 70 | 71 | } |
| 71 | 72 | } |
| 72 | 73 | if ( $url == '' |
@@ -74,7 +75,8 @@ discard block |
||
| 74 | 75 | try { |
| 75 | 76 | $deliverable = org_openpsa_sales_salesproject_deliverable_dba::get_cached($this->deliverable); |
| 76 | 77 | $url = $sales_url . 'deliverable/' . $deliverable->guid . '/'; |
| 77 | - } catch (midcom_error $e) { |
|
| 78 | + } |
|
| 79 | + catch (midcom_error $e) { |
|
| 78 | 80 | } |
| 79 | 81 | } |
| 80 | 82 | if ($url != '') { |
@@ -96,7 +98,8 @@ discard block |
||
| 96 | 98 | $deliverable = new org_openpsa_sales_salesproject_deliverable_dba($this->deliverable); |
| 97 | 99 | self::update_deliverable($deliverable); |
| 98 | 100 | } |
| 99 | - } catch (midcom_error $e) { |
|
| 101 | + } |
|
| 102 | + catch (midcom_error $e) { |
|
| 100 | 103 | $e->log(); |
| 101 | 104 | } |
| 102 | 105 | } |
@@ -25,7 +25,8 @@ discard block |
||
| 25 | 25 | midcom::get()->auth->request_sudo($this->_component); |
| 26 | 26 | try { |
| 27 | 27 | $person = new midcom_db_person($args['guid']); |
| 28 | - } catch (midcom_error $e) { |
|
| 28 | + } |
|
| 29 | + catch (midcom_error $e) { |
|
| 29 | 30 | $handler->print_error('Person with guid #' . $args['guid'] . ' does not exist'); |
| 30 | 31 | midcom::get()->auth->drop_sudo(); |
| 31 | 32 | return false; |
@@ -33,7 +34,8 @@ discard block |
||
| 33 | 34 | $accounthelper = new org_openpsa_user_accounthelper($person); |
| 34 | 35 | try { |
| 35 | 36 | $accounthelper->reopen_account(); |
| 36 | - } catch (midcom_error $e) { |
|
| 37 | + } |
|
| 38 | + catch (midcom_error $e) { |
|
| 37 | 39 | $handler->print_error($e->getMessage()); |
| 38 | 40 | midcom::get()->auth->drop_sudo(); |
| 39 | 41 | return false; |
@@ -23,7 +23,8 @@ discard block |
||
| 23 | 23 | try { |
| 24 | 24 | $person = new midcom_db_person($this->uid); |
| 25 | 25 | $grp = new midcom_db_group($this->gid); |
| 26 | - } catch (midcom_error $e) { |
|
| 26 | + } |
|
| 27 | + catch (midcom_error $e) { |
|
| 27 | 28 | $e->log(); |
| 28 | 29 | return 'Invalid membership record'; |
| 29 | 30 | } |
@@ -40,7 +41,8 @@ discard block |
||
| 40 | 41 | } |
| 41 | 42 | try { |
| 42 | 43 | $person = new midcom_db_person($this->uid); |
| 43 | - } catch (midcom_error $e) { |
|
| 44 | + } |
|
| 45 | + catch (midcom_error $e) { |
|
| 44 | 46 | return; |
| 45 | 47 | } |
| 46 | 48 | midcom::get()->cache->invalidate($person->guid); |
@@ -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 | } |