mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-11-28 02:00:01 +00:00
Improve invalid title error message
Include the text of the title being complained about when returning an invalid title error from expandTemplate. Change-Id: I2261f9574557c3ae514c39cea71f9777f8f9f431
This commit is contained in:
parent
29452c9bef
commit
18f177a3a9
|
@ -444,7 +444,7 @@ abstract class Scribunto_LuaEngine extends ScribuntoEngineBase {
|
||||||
$frame = $this->getFrameById( $frameId );
|
$frame = $this->getFrameById( $frameId );
|
||||||
$title = Title::newFromText( $titleText, NS_TEMPLATE );
|
$title = Title::newFromText( $titleText, NS_TEMPLATE );
|
||||||
if ( !$title ) {
|
if ( !$title ) {
|
||||||
throw new Scribunto_LuaError( 'expandTemplate: invalid title' );
|
throw new Scribunto_LuaError( "expandTemplate: invalid title \"$titleText\"" );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $frame->depth >= $this->parser->mOptions->getMaxTemplateDepth() ) {
|
if ( $frame->depth >= $this->parser->mOptions->getMaxTemplateDepth() ) {
|
||||||
|
|
Loading…
Reference in a new issue