@@ -123,7 +123,8 @@ |
||
| 123 | 123 | try { |
| 124 | 124 | $this->$function($request->request, $request->files); |
| 125 | 125 | $this->response['success'] = true; |
| 126 | - } catch (midcom_error $e) { |
|
| 126 | + } |
|
| 127 | + catch (midcom_error $e) { |
|
| 127 | 128 | $this->response['success'] = false; |
| 128 | 129 | $this->response['error'] = $e->getMessage(); |
| 129 | 130 | } |
@@ -33,7 +33,8 @@ |
||
| 33 | 33 | $member->require_do('midgard:update'); |
| 34 | 34 | $member->extra = $request->request->get('title'); |
| 35 | 35 | $response['status'] = $member->update(); |
| 36 | - } catch (midcom_error $e) { |
|
| 36 | + } |
|
| 37 | + catch (midcom_error $e) { |
|
| 37 | 38 | $e->log(); |
| 38 | 39 | } |
| 39 | 40 | $response['message'] = midcom_connection::get_error_string(); |
@@ -116,7 +116,8 @@ discard block |
||
| 116 | 116 | //TODO: check for duplicates ? |
| 117 | 117 | try { |
| 118 | 118 | $result = ['other_obj' => midcom::get()->dbfactory->get_object_by_guid($link[$other . 'Guid'])]; |
| 119 | - } catch (midcom_error $e) { |
|
| 119 | + } |
|
| 120 | + catch (midcom_error $e) { |
|
| 120 | 121 | continue; |
| 121 | 122 | } |
| 122 | 123 | $result['link'] = [ |
@@ -403,7 +404,8 @@ discard block |
||
| 403 | 404 | if (!($this->_object instanceof org_openpsa_relatedto_dba)) { |
| 404 | 405 | $response['status'] = "method requires guid of a link object as an argument"; |
| 405 | 406 | } |
| 406 | - } catch (midcom_error $e) { |
|
| 407 | + } |
|
| 408 | + catch (midcom_error $e) { |
|
| 407 | 409 | $response['status'] = "error: " . $e->getMessage(); |
| 408 | 410 | } |
| 409 | 411 | |
@@ -424,7 +426,8 @@ discard block |
||
| 424 | 426 | $relation = new org_openpsa_relatedto_dba($guid); |
| 425 | 427 | $result = $relation->delete(); |
| 426 | 428 | $status = 'Last message: ' . midcom_connection::get_error_string(); |
| 427 | - } catch (midcom_error $e) { |
|
| 429 | + } |
|
| 430 | + catch (midcom_error $e) { |
|
| 428 | 431 | $result = false; |
| 429 | 432 | $status = "Object '{$guid}' could not be loaded, error:" . $e->getMessage(); |
| 430 | 433 | } |