From 391b000b8a18a83fd75cca42858a8c5b24d44a18 Mon Sep 17 00:00:00 2001 From: Daniel Cannon Date: Wed, 26 Sep 2007 04:28:48 +0000 Subject: [PATCH] (bug 11404) API: Provide name of exception caught in error code field of internal api error messages. --- RELEASE-NOTES | 2 ++ includes/api/ApiMain.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index b8be283524..436fff1f64 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -81,6 +81,8 @@ Full API documentation is available at http://www.mediawiki.org/wiki/API help document. * (bug 11405) Expand templates implementation in the API * (bug 11218) Add option to feedwatchlist to display multiple revisions for each page. +* (bug 11404) Provide name of exception caught in error code field of internal api + error messages. === Languages updated in 1.12 === diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index 6a18eaf854..49542e6844 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -263,7 +263,7 @@ class ApiMain extends ApiBase { // Something is seriously wrong // $errMessage = array ( - 'code' => 'internal_api_error', + 'code' => 'internal_api_error_'. get_class($e), 'info' => "Exception Caught: {$e->getMessage()}" ); ApiResult :: setContent($errMessage, "\n\n{$e->getTraceAsString()}\n\n"); -- 2.20.1