@@ -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 | } |
@@ -166,7 +166,8 @@ discard block |
||
| 166 | 166 | break; |
| 167 | 167 | } |
| 168 | 168 | } |
| 169 | - } catch (midcom_error $e) { |
|
| 169 | + } |
|
| 170 | + catch (midcom_error $e) { |
|
| 170 | 171 | } |
| 171 | 172 | |
| 172 | 173 | $path_parts = array_reverse($path_parts); |
@@ -410,7 +411,8 @@ discard block |
||
| 410 | 411 | && $db_style = $this->get_style_id_from_path($root_topic->style)) { |
| 411 | 412 | $_style = $this->_get_element_in_styletree($db_style, $_element); |
| 412 | 413 | } |
| 413 | - } catch (midcom_error_forbidden $e) { |
|
| 414 | + } |
|
| 415 | + catch (midcom_error_forbidden $e) { |
|
| 414 | 416 | $e->log(); |
| 415 | 417 | } |
| 416 | 418 | |
@@ -384,7 +384,8 @@ discard block |
||
| 384 | 384 | $value = $link->value; |
| 385 | 385 | |
| 386 | 386 | $tags[$key] = $value; |
| 387 | - } catch (midcom_error $e) { |
|
| 387 | + } |
|
| 388 | + catch (midcom_error $e) { |
|
| 388 | 389 | $e->log(); |
| 389 | 390 | } |
| 390 | 391 | } |
@@ -443,7 +444,8 @@ discard block |
||
| 443 | 444 | try { |
| 444 | 445 | $tag = net_nemein_tag_tag_dba::get_cached($link->tag); |
| 445 | 446 | $link_object_map[$link->fromGuid][$tag->tag] = $link; |
| 446 | - } catch (midcom_error $e) { |
|
| 447 | + } |
|
| 448 | + catch (midcom_error $e) { |
|
| 447 | 449 | $e->log(); |
| 448 | 450 | } |
| 449 | 451 | } |
@@ -472,7 +474,8 @@ discard block |
||
| 472 | 474 | $tmpobject = midcom::get()->dbfactory->convert_midgard_to_midcom($tmpobject); |
| 473 | 475 | } |
| 474 | 476 | $return[] = $tmpobject; |
| 475 | - } catch (midcom_error $e) { |
|
| 477 | + } |
|
| 478 | + catch (midcom_error $e) { |
|
| 476 | 479 | $e->log(); |
| 477 | 480 | } |
| 478 | 481 | } |