If you call mw.title.new with a pageid that doesn't correspond to an actual page, then you get the Mediawiki error page with message:
PHP fatal error in /usr/local/apache/common-local/php-1.21wmf11/extensions/Scribunto/engines/LuaCommon/TitleLibrary.php line 60:
Argument 1 passed to Scribunto_LuaTitleLibrary::returnTitleToLua() must be an instance of Title, null given, called in /usr/local/apache/common-local/php-1.21wmf11/extensions/Scribunto/engines/LuaCommon/TitleLibrary.php on line 139 and defined
Version: unspecified
Severity: normal