@@ -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 | } |
@@ -107,7 +107,8 @@ |
||
| 107 | 107 | if (!empty($_POST['midcom_helper_datamanager2_save'])) { |
| 108 | 108 | try { |
| 109 | 109 | $rules = $this->_load_rules(); |
| 110 | - } catch (midcom_error $e) { |
|
| 110 | + } |
|
| 111 | + catch (midcom_error $e) { |
|
| 111 | 112 | midcom::get()->uimessages->add('org.openpsa.directmarketing', $this->_l10n->get($e->getMessage()), 'error'); |
| 112 | 113 | return; |
| 113 | 114 | } |
@@ -23,7 +23,8 @@ |
||
| 23 | 23 | foreach ($this->_try_backends as $backend) { |
| 24 | 24 | try { |
| 25 | 25 | $this->_backend = org_openpsa_mail_backend::get($backend, $params); |
| 26 | - } catch (midcom_error $e) { |
|
| 26 | + } |
|
| 27 | + catch (midcom_error $e) { |
|
| 27 | 28 | debug_add('Failed to load backend ' . $backend . ', message:' . $e->getMessage()); |
| 28 | 29 | } |
| 29 | 30 | } |
@@ -42,7 +42,8 @@ discard block |
||
| 42 | 42 | $object = self::_load_backend($backend, $params); |
| 43 | 43 | debug_add('Using backend ' . $backend); |
| 44 | 44 | return $object; |
| 45 | - } catch (midcom_error $e) { |
|
| 45 | + } |
|
| 46 | + catch (midcom_error $e) { |
|
| 46 | 47 | debug_add('Failed to load backend ' . $backend . ', message:' . $e->getMessage()); |
| 47 | 48 | } |
| 48 | 49 | } |
@@ -67,7 +68,8 @@ discard block |
||
| 67 | 68 | $ret = $this->mail($message); |
| 68 | 69 | $this->error = false; |
| 69 | 70 | return $ret; |
| 70 | - } catch (Exception $e) { |
|
| 71 | + } |
|
| 72 | + catch (Exception $e) { |
|
| 71 | 73 | $this->error = $e->getMessage(); |
| 72 | 74 | return false; |
| 73 | 75 | } |
@@ -41,7 +41,8 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | try { |
| 43 | 43 | $folder = midcom_db_topic::get_cached($this->topic); |
| 44 | - } catch (midcom_error $e) { |
|
| 44 | + } |
|
| 45 | + catch (midcom_error $e) { |
|
| 45 | 46 | $e->log(); |
| 46 | 47 | } |
| 47 | 48 | $folder->delete_attachment(self::FOLDER_THUMBNAIL); |
@@ -51,7 +52,8 @@ discard block |
||
| 51 | 52 | { |
| 52 | 53 | try { |
| 53 | 54 | return new midcom_db_attachment($this->$type); |
| 54 | - } catch (midcom_error $e) { |
|
| 55 | + } |
|
| 56 | + catch (midcom_error $e) { |
|
| 55 | 57 | $e->log(); |
| 56 | 58 | return false; |
| 57 | 59 | } |
@@ -55,7 +55,8 @@ |
||
| 55 | 55 | $guid = $parts[1]; |
| 56 | 56 | try { |
| 57 | 57 | $attachments[$parts[0]] = midcom_db_attachment::get_cached($guid); |
| 58 | - } catch (midcom_error $e) { |
|
| 58 | + } |
|
| 59 | + catch (midcom_error $e) { |
|
| 59 | 60 | $e->log(); |
| 60 | 61 | } |
| 61 | 62 | } |
@@ -35,7 +35,8 @@ |
||
| 35 | 35 | try { |
| 36 | 36 | midcom::get()->dbfactory->get_object_by_guid($param->name); |
| 37 | 37 | $tried[$param->name] = true; |
| 38 | - } catch (midcom_error $e) { |
|
| 38 | + } |
|
| 39 | + catch (midcom_error $e) { |
|
| 39 | 40 | $tried[$param->name] = false; |
| 40 | 41 | } |
| 41 | 42 | } |
@@ -30,7 +30,8 @@ |
||
| 30 | 30 | $member->require_do('midgard:update'); |
| 31 | 31 | $member->extra = $_POST['title']; |
| 32 | 32 | $response->status = $member->update(); |
| 33 | - } catch (midcom_error $e) { |
|
| 33 | + } |
|
| 34 | + catch (midcom_error $e) { |
|
| 34 | 35 | $e->log(); |
| 35 | 36 | } |
| 36 | 37 | $response->message = midcom_connection::get_error_string(); |