jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/361508 )

Change subject: Add some logging to debug T166348
......................................................................


Add some logging to debug T166348

Just putting this hack in wmf.6, not needed in master.

Apparently when we tried this for wmf.5, it got merged but was never
actually deployed.

Bug: T166348
Change-Id: Ief1dd9ff938dc46b255fb4696b58638cd317fea3
---
M engines/LuaSandbox/Engine.php
1 file changed, 6 insertions(+), 1 deletion(-)

Approvals:
  20after4: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/engines/LuaSandbox/Engine.php b/engines/LuaSandbox/Engine.php
index 963adef..668082a 100644
--- a/engines/LuaSandbox/Engine.php
+++ b/engines/LuaSandbox/Engine.php
@@ -331,8 +331,13 @@
                                // Per the documentation on 
LuaSandboxFunction::call, a return value
                                // of false means that something went wrong and 
it's PHP's fault,
                                // so throw a "real" exception.
-                               throw new MWException(
+                               $ex = new MWException(
                                        __METHOD__ . ': 
LuaSandboxFunction::call returned false' );
+                               wfDebugLog( 'AdHocDebug', $ex->getMessage(), 
'private', [
+                                       'exception' => $ex,
+                                       'args' => array_map( 'serialize', $args 
),
+                               ] );
+                               throw $ex;
                        }
                        return $ret;
                } catch ( LuaSandboxTimeoutError $e ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/361508
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ief1dd9ff938dc46b255fb4696b58638cd317fea3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: wmf/1.30.0-wmf.6
Gerrit-Owner: Anomie <[email protected]>
Gerrit-Reviewer: 20after4 <[email protected]>
Gerrit-Reviewer: Jackmcbarn <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to