Bsitu has uploaded a new change for review. https://gerrit.wikimedia.org/r/146508
Change subject: A couple of fixes to CatchableFatalErrorException ...................................................................... A couple of fixes to CatchableFatalErrorException Followup to https://gerrit.wikimedia.org/r/#/c/140414/, a couple of issues were not spotted during the merge Change-Id: Ia6543845f1ec851c0b0ae53eb9bc021c27c34fff --- M Hooks.php A includes/CatchableFatalErrorException.php M includes/RecoverableErrorHandler.php 3 files changed, 16 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/08/146508/1 diff --git a/Hooks.php b/Hooks.php index 81554e1..e851228 100644 --- a/Hooks.php +++ b/Hooks.php @@ -214,7 +214,7 @@ return false; } $line = Container::get( 'formatter.recentchanges' )->format( $row, $changesList ); - } catch ( FlowException $e ) { + } catch ( Exception $e ) { wfDebugLog( 'Flow', __METHOD__ . ': Exception formatting rc ' . $rc->getAttribute( 'rc_id' ) . ' ' . $e ); \MWExceptionHandler::logException( $e ); restore_error_handler(); @@ -248,7 +248,7 @@ if ( $row !== false ) { $replacement = Container::get( 'formatter.checkuser' )->format( $row, $checkUser->getContext() ); } - } catch ( FlowException $e ) { + } catch ( Exception $e ) { wfDebugLog( 'Flow', __METHOD__ . ': Exception formatting cu ' . $row->cuc_id . ' ' . $e ); \MWExceptionHandler::logException( $e ); } diff --git a/includes/CatchableFatalErrorException.php b/includes/CatchableFatalErrorException.php new file mode 100644 index 0000000..678ca0a --- /dev/null +++ b/includes/CatchableFatalErrorException.php @@ -0,0 +1,13 @@ +<?php + +namespace Flow; + +use ErrorException; + +/** + * This class is not necessary, but having this so we could + * have a specific exception type to catch? + */ +class CatchableFatalErrorException extends ErrorException { + +} diff --git a/includes/RecoverableErrorHandler.php b/includes/RecoverableErrorHandler.php index 52ad1fa..7a94d6d 100644 --- a/includes/RecoverableErrorHandler.php +++ b/includes/RecoverableErrorHandler.php @@ -21,6 +21,6 @@ return false; } - throw new CatchableFatalErrorException( $errno, $errstr, $errfile, $errline ); + throw new CatchableFatalErrorException( $errstr, 0, $errno, $errfile, $errline ); } } -- To view, visit https://gerrit.wikimedia.org/r/146508 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia6543845f1ec851c0b0ae53eb9bc021c27c34fff Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Bsitu <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
