@@ -29,7 +29,8 @@ |
||
| 29 | 29 | foreach ($qb->execute() as $article) { |
| 30 | 30 | try { |
| 31 | 31 | $datamanager->set_storage($article); |
| 32 | - } catch (midcom_error $e) { |
|
| 32 | + } |
|
| 33 | + catch (midcom_error $e) { |
|
| 33 | 34 | $e->log(MIDCOM_LOG_WARN); |
| 34 | 35 | continue; |
| 35 | 36 | } |
@@ -57,7 +57,8 @@ |
||
| 57 | 57 | $classname = $this->_real_class; |
| 58 | 58 | try { |
| 59 | 59 | $result[] = new $classname($object); |
| 60 | - } catch (midcom_error $e) { |
|
| 60 | + } |
|
| 61 | + catch (midcom_error $e) { |
|
| 61 | 62 | if ($e->getCode() == MIDCOM_ERRFORBIDDEN) { |
| 62 | 63 | $this->denied++; |
| 63 | 64 | } |
@@ -93,7 +93,8 @@ |
||
| 93 | 93 | // ->source will always contain the document GUID |
| 94 | 94 | $data['document'] = new org_openpsa_documents_document_dba($document->source); |
| 95 | 95 | $this->datamanager->set_storage($data['document']); |
| 96 | - } catch (midcom_error $e) { |
|
| 96 | + } |
|
| 97 | + catch (midcom_error $e) { |
|
| 97 | 98 | $e->log(); |
| 98 | 99 | continue; |
| 99 | 100 | } |
@@ -8,7 +8,8 @@ |
||
| 8 | 8 | if ($customer->orgOpenpsaObtype <= org_openpsa_contacts_group_dba::MYCONTACTS) { |
| 9 | 9 | $customer = false; |
| 10 | 10 | } |
| 11 | -} catch (midcom_error $e) { |
|
| 11 | +} |
|
| 12 | +catch (midcom_error $e) { |
|
| 12 | 13 | $customer = false; |
| 13 | 14 | } |
| 14 | 15 | |
@@ -106,7 +106,8 @@ |
||
| 106 | 106 | { |
| 107 | 107 | $ret = ['org_openpsa_relatedto' => []]; |
| 108 | 108 | foreach ($array as $rel) { |
| 109 | - if (!midcom::get()->dbfactory->is_a($rel, org_openpsa_relatedto_dba::class)) { //Matches also 'org_openpsa_relatedto' |
|
| 109 | + if (!midcom::get()->dbfactory->is_a($rel, org_openpsa_relatedto_dba::class)) { |
|
| 110 | +//Matches also 'org_openpsa_relatedto' |
|
| 110 | 111 | //Wrong type of object found in array, cruelly abort the whole procedure |
| 111 | 112 | return false; |
| 112 | 113 | } |
@@ -103,7 +103,8 @@ |
||
| 103 | 103 | try { |
| 104 | 104 | midcom_db_topic::get_cached($node_guid); |
| 105 | 105 | $available_generators[$component] = midcom::get()->i18n->get_string($component, $component); |
| 106 | - } catch (midcom_error $e) { |
|
| 106 | + } |
|
| 107 | + catch (midcom_error $e) { |
|
| 107 | 108 | debug_add("topic for component '{$component}' not found or accessible"); |
| 108 | 109 | } |
| 109 | 110 | } |
@@ -76,7 +76,8 @@ |
||
| 76 | 76 | } else { |
| 77 | 77 | try { |
| 78 | 78 | $this->initialize_index_article($topic); |
| 79 | - } catch (midcom_error $e) { |
|
| 79 | + } |
|
| 80 | + catch (midcom_error $e) { |
|
| 80 | 81 | // Could not create index |
| 81 | 82 | $topic->delete(); |
| 82 | 83 | throw $e; |
@@ -121,7 +121,8 @@ |
||
| 121 | 121 | |
| 122 | 122 | try { |
| 123 | 123 | $response = $client->send($request); |
| 124 | - } catch (Exception $e) { |
|
| 124 | + } |
|
| 125 | + catch (Exception $e) { |
|
| 125 | 126 | $this->error = $e->getMessage(); |
| 126 | 127 | debug_add("Got error '{$this->error}' from HTTP request", MIDCOM_LOG_INFO); |
| 127 | 128 | return false; |
@@ -115,7 +115,8 @@ |
||
| 115 | 115 | MIDCOM_TOOLBAR_GLYPHICON => 'money', |
| 116 | 116 | ]; |
| 117 | 117 | } |
| 118 | - } catch (midcom_error $e) { |
|
| 118 | + } |
|
| 119 | + catch (midcom_error $e) { |
|
| 119 | 120 | } |
| 120 | 121 | } |
| 121 | 122 | |