@@ -205,7 +205,8 @@ |
||
| 205 | 205 | // FIXME figure out why this always tries to put something to the default cache dir (it does put stuff to the defined one as well) |
| 206 | 206 | try { |
| 207 | 207 | $ret = $purifier->purify($content); |
| 208 | - } catch (Exception $e) { |
|
| 208 | + } |
|
| 209 | + catch (Exception $e) { |
|
| 209 | 210 | debug_add("HTML Purifier failed to purify contents of field {$this->name}: " . $e->getMessage(), MIDCOM_LOG_WARN); |
| 210 | 211 | } |
| 211 | 212 | |
@@ -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 | } |
@@ -143,7 +143,8 @@ |
||
| 143 | 143 | |
| 144 | 144 | try { |
| 145 | 145 | $data = file_get_contents($filename); |
| 146 | - } catch (Exception $e) { |
|
| 146 | + } |
|
| 147 | + catch (Exception $e) { |
|
| 147 | 148 | return false; |
| 148 | 149 | } |
| 149 | 150 | |
@@ -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 | } |
@@ -62,7 +62,8 @@ |
||
| 62 | 62 | try { |
| 63 | 63 | $this->__object = call_user_func(array($this->__midcom_class_name__, 'get_cached'), $this->__identifier); |
| 64 | 64 | return true; |
| 65 | - } catch (midcom_error $e) { |
|
| 65 | + } |
|
| 66 | + catch (midcom_error $e) { |
|
| 66 | 67 | $e->log(); |
| 67 | 68 | } |
| 68 | 69 | return false; |
@@ -153,7 +153,8 @@ |
||
| 153 | 153 | $job['component'] = $component; |
| 154 | 154 | $this->_jobs[] = $job; |
| 155 | 155 | } |
| 156 | - } catch (midcom_error $e) { |
|
| 156 | + } |
|
| 157 | + catch (midcom_error $e) { |
|
| 157 | 158 | $e->log(MIDCOM_LOG_ERROR); |
| 158 | 159 | debug_print_r('Got this job declaration:', $job); |
| 159 | 160 | echo "ERROR: Failed to register a job for {$component}: " . $e->getMessage() . "\n"; |
@@ -85,7 +85,8 @@ |
||
| 85 | 85 | |
| 86 | 86 | try { |
| 87 | 87 | $this->session->start(); |
| 88 | - } catch (RuntimeException $e) { |
|
| 88 | + } |
|
| 89 | + catch (RuntimeException $e) { |
|
| 89 | 90 | debug_add($e->getMessage(), MIDCOM_LOG_ERROR); |
| 90 | 91 | return false; |
| 91 | 92 | } |
@@ -196,7 +196,8 @@ |
||
| 196 | 196 | |
| 197 | 197 | try { |
| 198 | 198 | $diff_fields = $rcs_handler->get_diff($prev_version, $this_version, 'unified'); |
| 199 | - } catch (midcom_error $e) { |
|
| 199 | + } |
|
| 200 | + catch (midcom_error $e) { |
|
| 200 | 201 | $e->log(); |
| 201 | 202 | return ''; |
| 202 | 203 | } |