r24286 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24285‎ | r24286 | r24287 >
Date:15:15, 20 July 2007
Author:brion
Status:old
Tags:
Comment:
pretty up the hook error message with an explanation of what it should do instead
Modified paths:
  • /trunk/phase3/includes/Hooks.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Hooks.php
@@ -130,7 +130,9 @@
131131 } else {
132132 $prettyFunc = strval( $callback );
133133 }
134 - throw new MWException( "Invalid NULL return from broken hook $prettyFunc" );
 134+ throw new MWException( "Detected bug in an extension! " .
 135+ "Hook $prettyFunc failed to return a value; " .
 136+ "should return true to continue hook processing or false to abort." );
135137 } else if (!$retval) {
136138 return false;
137139 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r24302Merged revisions 24276-24301 via svnmerge from...david03:42, 21 July 2007

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r23133* Throw a showstopper exception when a hook function fails to return a value....brion19:35, 20 June 2007

Status & tagging log