@@ -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 | } |
@@ -16,7 +16,8 @@ |
||
| 16 | 16 | foreach ($atts as $att) { |
| 17 | 17 | try { |
| 18 | 18 | $att->file_to_cache(); |
| 19 | - } catch (midcom_error $e) { |
|
| 19 | + } |
|
| 20 | + catch (midcom_error $e) { |
|
| 20 | 21 | echo 'Error: ' . $e->getMessage() . "\n"; |
| 21 | 22 | } |
| 22 | 23 | } |
@@ -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 | } |
@@ -66,7 +66,8 @@ discard block |
||
| 66 | 66 | try { |
| 67 | 67 | $person1 = new org_openpsa_contacts_person_dba($param->parentguid); |
| 68 | 68 | $person2 = new org_openpsa_contacts_person_dba($param->name); |
| 69 | - } catch (midcom_error $e) { |
|
| 69 | + } |
|
| 70 | + catch (midcom_error $e) { |
|
| 70 | 71 | $i++; |
| 71 | 72 | continue; |
| 72 | 73 | } |
@@ -137,7 +138,8 @@ discard block |
||
| 137 | 138 | try { |
| 138 | 139 | $merger = new org_openpsa_contacts_duplicates_merge('person', $this->_config); |
| 139 | 140 | $merger->merge_delete($person1, $person2); |
| 140 | - } catch (midcom_error $e) { |
|
| 141 | + } |
|
| 142 | + catch (midcom_error $e) { |
|
| 141 | 143 | // TODO: Localize |
| 142 | 144 | midcom::get()->uimessages->add($this->_l10n->get('org.openpsa.contacts'), 'Merge failed, errstr: ' . $e->getMessage(), 'error'); |
| 143 | 145 | } |
@@ -380,7 +380,8 @@ discard block |
||
| 380 | 380 | try { |
| 381 | 381 | $cmd = midcom::get()->config->get('utility_imagemagick_base') . "identify " . escapeshellarg($filename); |
| 382 | 382 | $this->_run_command($cmd); |
| 383 | - } catch (midcom_error $e) { |
|
| 383 | + } |
|
| 384 | + catch (midcom_error $e) { |
|
| 384 | 385 | return false; |
| 385 | 386 | } |
| 386 | 387 | return true; |
@@ -406,7 +407,8 @@ discard block |
||
| 406 | 407 | debug_add("EXIF information missing or without orientation tag. Skipping.", MIDCOM_LOG_INFO); |
| 407 | 408 | return; |
| 408 | 409 | } |
| 409 | - } catch (Exception $e) { |
|
| 410 | + } |
|
| 411 | + catch (Exception $e) { |
|
| 410 | 412 | debug_add("Could not read EXIF data: " . $e->getMessage() . ", skipping.", MIDCOM_LOG_WARN); |
| 411 | 413 | return; |
| 412 | 414 | } |
@@ -453,7 +453,8 @@ discard block |
||
| 453 | 453 | |
| 454 | 454 | try { |
| 455 | 455 | @exec($command, $output, $status); |
| 456 | - } catch (Exception $e) { |
|
| 456 | + } |
|
| 457 | + catch (Exception $e) { |
|
| 457 | 458 | debug_add($e->getMessage()); |
| 458 | 459 | } |
| 459 | 460 | |
@@ -549,7 +550,8 @@ discard block |
||
| 549 | 550 | |
| 550 | 551 | try { |
| 551 | 552 | $object = midcom::get()->dbfactory->get_object_by_guid($this->_guid); |
| 552 | - } catch (midcom_error $e) { |
|
| 553 | + } |
|
| 554 | + catch (midcom_error $e) { |
|
| 553 | 555 | debug_add("{$this->_guid} could not be resolved to object", MIDCOM_LOG_ERROR); |
| 554 | 556 | return false; |
| 555 | 557 | } |
@@ -735,7 +735,8 @@ |
||
| 735 | 735 | */ |
| 736 | 736 | try { |
| 737 | 737 | return $object->get_by_id($object->id); |
| 738 | - } catch (exception $e) { |
|
| 738 | + } |
|
| 739 | + catch (exception $e) { |
|
| 739 | 740 | return false; |
| 740 | 741 | } |
| 741 | 742 | } |