(bug 11404) API: Provide name of exception caught in error code field of internal...
authorDaniel Cannon <amidaniel@users.mediawiki.org>
Wed, 26 Sep 2007 04:28:48 +0000 (04:28 +0000)
committerDaniel Cannon <amidaniel@users.mediawiki.org>
Wed, 26 Sep 2007 04:28:48 +0000 (04:28 +0000)
RELEASE-NOTES
includes/api/ApiMain.php

index b8be283..436fff1 100644 (file)
@@ -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 ===
 
index 6a18eaf..49542e6 100644 (file)
@@ -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");