@@ -47,7 +47,8 @@ |
||
| 47 | 47 | if ($node_id) { |
| 48 | 48 | try { |
| 49 | 49 | $comments_topic = new midcom_db_topic($node_id); |
| 50 | - } catch (midcom_error $e) { |
|
| 50 | + } |
|
| 51 | + catch (midcom_error $e) { |
|
| 51 | 52 | return null; |
| 52 | 53 | } |
| 53 | 54 | |
@@ -409,7 +409,8 @@ |
||
| 409 | 409 | foreach ($this->_articles as $article_counter => $article) { |
| 410 | 410 | try { |
| 411 | 411 | $data['datamanager']->set_storage($article); |
| 412 | - } catch (midcom_error $e) { |
|
| 412 | + } |
|
| 413 | + catch (midcom_error $e) { |
|
| 413 | 414 | $e->log(); |
| 414 | 415 | continue; |
| 415 | 416 | } |
@@ -386,7 +386,8 @@ |
||
| 386 | 386 | debug_add("EXIF information missing or without orientation tag. Skipping.", MIDCOM_LOG_INFO); |
| 387 | 387 | return; |
| 388 | 388 | } |
| 389 | - } catch (Exception $e) { |
|
| 389 | + } |
|
| 390 | + catch (Exception $e) { |
|
| 390 | 391 | debug_add("Could not read EXIF data: " . $e->getMessage() . ", skipping.", MIDCOM_LOG_WARN); |
| 391 | 392 | return; |
| 392 | 393 | } |
@@ -64,7 +64,8 @@ |
||
| 64 | 64 | try { |
| 65 | 65 | $backend->update($message); |
| 66 | 66 | return true; |
| 67 | - } catch (midcom_error $e) { |
|
| 67 | + } |
|
| 68 | + catch (midcom_error $e) { |
|
| 68 | 69 | debug_add('RCS: Could not save file!'); |
| 69 | 70 | $e->log(); |
| 70 | 71 | return false; |
@@ -50,9 +50,11 @@ |
||
| 50 | 50 | $filepath = $this->generate_filename(); |
| 51 | 51 | try { |
| 52 | 52 | $this->exec('co -q -f -r' . escapeshellarg(trim($revision)) . " {$filepath} 2>/dev/null"); |
| 53 | - } catch (midcom_error $e) { |
|
| 53 | + } |
|
| 54 | + catch (midcom_error $e) { |
|
| 54 | 55 | $e->log(); |
| 55 | - } finally { |
|
| 56 | + } |
|
| 57 | + finally { |
|
| 56 | 58 | if (!file_exists($filepath)) { |
| 57 | 59 | return []; |
| 58 | 60 | } |
@@ -55,7 +55,8 @@ |
||
| 55 | 55 | { |
| 56 | 56 | try { |
| 57 | 57 | return eval("return [{$data}\n];"); |
| 58 | - } catch (ParseError $e) { |
|
| 58 | + } |
|
| 59 | + catch (ParseError $e) { |
|
| 59 | 60 | throw new midcom_error('Failed to parse config data: ' . $e->getMessage() . ' in ' . $path . ' line ' . $e->getLine()); |
| 60 | 61 | } |
| 61 | 62 | } |
@@ -371,7 +371,8 @@ discard block |
||
| 371 | 371 | $tag = new net_nemein_tag_tag_dba($link->tag); |
| 372 | 372 | |
| 373 | 373 | $tags[$tag->tag] = $link->value; |
| 374 | - } catch (midcom_error $e) { |
|
| 374 | + } |
|
| 375 | + catch (midcom_error $e) { |
|
| 375 | 376 | $e->log(); |
| 376 | 377 | } |
| 377 | 378 | } |
@@ -427,7 +428,8 @@ discard block |
||
| 427 | 428 | try { |
| 428 | 429 | $tag = net_nemein_tag_tag_dba::get_cached($link->tag); |
| 429 | 430 | $link_object_map[$link->fromGuid][$tag->tag] = $link; |
| 430 | - } catch (midcom_error $e) { |
|
| 431 | + } |
|
| 432 | + catch (midcom_error $e) { |
|
| 431 | 433 | $e->log(); |
| 432 | 434 | } |
| 433 | 435 | } |
@@ -456,7 +458,8 @@ discard block |
||
| 456 | 458 | $tmpobject = midcom::get()->dbfactory->convert_midgard_to_midcom($tmpobject); |
| 457 | 459 | } |
| 458 | 460 | $return[] = $tmpobject; |
| 459 | - } catch (midcom_error $e) { |
|
| 461 | + } |
|
| 462 | + catch (midcom_error $e) { |
|
| 460 | 463 | $e->log(); |
| 461 | 464 | } |
| 462 | 465 | } |
@@ -17,7 +17,8 @@ |
||
| 17 | 17 | foreach ($data['objects'] as $guid => $privs) { |
| 18 | 18 | try { |
| 19 | 19 | $object = new midcom_db_topic($guid); |
| 20 | - } catch (midcom_error $e) { |
|
| 20 | + } |
|
| 21 | + catch (midcom_error $e) { |
|
| 21 | 22 | continue; |
| 22 | 23 | } |
| 23 | 24 | echo "<tr>\n"; |
@@ -79,7 +79,8 @@ discard block |
||
| 79 | 79 | try { |
| 80 | 80 | $dms['group']->set_storage($group); |
| 81 | 81 | org_openpsa_products_viewer::index($dms['group'], $indexer, $topic, $config); |
| 82 | - } catch (midcom_error $e) { |
|
| 82 | + } |
|
| 83 | + catch (midcom_error $e) { |
|
| 83 | 84 | $e->log(MIDCOM_LOG_WARN); |
| 84 | 85 | } |
| 85 | 86 | } |
@@ -91,7 +92,8 @@ discard block |
||
| 91 | 92 | try { |
| 92 | 93 | $dms['product']->set_storage($product); |
| 93 | 94 | org_openpsa_products_viewer::index($dms['product'], $indexer, $topic, $config); |
| 94 | - } catch (midcom_error $e) { |
|
| 95 | + } |
|
| 96 | + catch (midcom_error $e) { |
|
| 95 | 97 | $e->log(MIDCOM_LOG_WARN); |
| 96 | 98 | } |
| 97 | 99 | } |