| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Previously it was just "internal error".
Change-Id: I70d81dfc628b462ab525d83f4a20d899da8ca143
|
|
|
|
|
|
| |
This makes the output formatting a bit prettier
Change-Id: I5d5c5a421326029323ef367feac70179ecb2d9e1
|
|
|
|
|
|
|
|
|
|
| |
* Most callers gracefully check wfReadOnly(),
but fail in case they dont. This also catches
foreign DBs which might slip through the cracks.
* Also remove useless wfDebug() call around
mDoneWrites check as write queries show in
the logs anyway.
Change-Id: I560ebd19c4eb2b3a040d4331702346440617cfaa
|
|
|
|
|
| |
Bug: T98788
Change-Id: I21974d6b775f13c33055f76c30142e937eb0e965
|
|
|
|
| |
Change-Id: I76601a86e30f4984e3b1a8c8ec5ef5a0f652433a
|
|
|
|
|
|
|
|
|
|
| |
Not everytime there is a problem to _contact_ the database server (e.g. a false server),
sometimes (e.g. a false password or username) it's a problem of the user credentials
or that the database does not exist. So use a more generic wording, just saying,
that the database could not be accessed.
Bug: T76317
Change-Id: I502d5894acb855ac51c6f45ea91e5446b4b3aeb3
|
|
|
|
|
|
|
|
| |
This was merged too quickly, has several issues.
This reverts commit 6abefb274ff9cd86f75d5d13f713e1971e1b27ce.
Change-Id: Ibf3e464fa9eb534d599274dd9262a30d5a6a6948
|
|
|
|
|
|
|
|
|
|
| |
The replace of $n params can also be done using the Message class. In
case there are no message keys, the RawMessage class is used.
Deprecated wfMsgReplaceArgs, but added no warning, because it is used in
some extensions and from deprecated functions
Change-Id: I62091b09e4490e59ed7258566e0ddf2f8ee799d2
|
|
|
|
| |
Change-Id: I903e68fc1f486501d790ca69146ecb835d90c9cc
|
|
|
|
|
|
|
|
| |
Follows-up 485ff9ead94b by making the same change in DBConnectionError,
which overrides MWException::msg() to not use database messages.
Bug: 58447
Change-Id: Iafa9dd741f1f099a4a6cfb8cf655b7d5f504011a
|
|
|
|
|
|
|
|
|
| |
* Some DB errors are caught while others bubble up to users.
It is useful to log the latter separately and it also provides
more context. The exception logs have a backtrace where as the
regular DB logs do not.
Change-Id: I7ef7693d96e0258119f714e678099e4813ca0c94
|
|
|
|
|
|
|
|
|
| |
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Also added some missing @param.
Change-Id: I3595e9aac69ac42fbb74b0783fae0ad9bcc831aa
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DBUnexpectedErrors are now treated like most other exceptions; we now
hide the error messages (which could contain sensitive information
such as IP addresses) unless $wgShowExceptionDetails is true.
In that case, the messages (and redacted backtraces) would be shown
even if $wgShowDBErrorBacktrace is false, though hiding them would
add complexity to the exception handler for little benefit.
Bug: 26811
Change-Id: I063c241975ce5b12a04abc21821ac67c716b3d5e
|
|
|
|
| |
Change-Id: I364e192e2624f89a91dcb19e371ce3412142a95f
|
|
|
|
|
|
|
| |
RequestContext::getMain() shifts the blame, but at least
it's one less place in core.
Change-Id: I36ffad0ff2703c3326690eef2c07ef66aa532210
|
|
|
|
|
|
| |
Fix all line length related CodeSniffer warnings.
Change-Id: Id0fd8f4c7276185f51489659ee3cd06962fbc16d
|
|
|
|
| |
Change-Id: I91f83e28ae25f80ba9e36c612f1ad050ffa1573c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most code replaced wasn't exactly like what logException does
but most probably should be.
A few implementation differences with the code it replaced in
various places:
* MWException if-guards
Was there only to prevent a crash because getLogMessage is an
MWException method. Now that logException is generic, it seems
sensible to start logging those as well (follows-up a97f3550a0).
* Exception::getTraceAsString
Now using MWExceptionHandler::formatRedactedTrace instead.
It wasn't using it because that method didn't exist yet.
Notes:
* DatabaseError::getLogMessage
Removed as this override was no longer doing anything (we're using
MWExceptionHandler::getLogMessage instead of $e->getLogMessage).
Introduced isLoggable() to take over the responsibility of indicating
when an exception should not be logged (follows-up bcb9f9e1c0d).
* DeferredUpdates and Wiki.php
Both specificy MWException. Though ApiMain intends to catch all
and only logged MWException because it couldn't otherwise, these
actually only catch MWException (as opposed to catching all and
having an if-statement inside). Left those as-is to have them
continue propagate other exceptions.
* JobQueueFederated and JobQueueGroup
All specify to catch JobQueueError only.
Not sure whether it should catch other exceptions. It now can,
but I'll leave it as is in case it intends to have those be
handled elsewhere (or fatal).
Change-Id: I4578a0fe7d95a080f1a3b292ce7ae73a4d5fcaca
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Interface:
* Restore sitename as part of error page document title
(follows-up 4ca9805). Moved to general Exception class as it
is useful in general, this effectively changes the title from
"This wiki has a problem" to "Internal error - Wikipedia".
* Added basic <style> to have it use a sans-serif font and a bit
padding to offset it from the edge of the window.
* Output stacktrace in <pre> as-is (with linebreaks) instead of
in a <p> with <br/>.
Clean up:
* Removed spurious "<!-- SiteSearch Google -->" comment.
* Change sitesearch radio button to not need the id/for
attributes but simply nest them. Visual rendering and browser
behaviour is identical.
* Renamed $text to $html since that is what it is (follows-up
4ca9805 which reused that variable for html, it used to contain
text).
* Remove odd linebreak from "dberr-problems" message, it was
being output as-is in the html (html escaped, of course) and
line breaks have no meaning inside an <h1> tag. Using a simple
space instead. Visual rendering is identical.
Coding style:
* Using <!DOCTYPE html> instead of <!doctype html> for consistency
with other documents we output.
* Switched a few inline #-style comments to use // instead.
* Switched a few strings from double quotes to single quotes in
areas close to the changed code.
Change-Id: I33232d871200cbd23501c9a6c5f8a178931e135e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Error details are now omitted if both $wgShowHostnames and
$wgShowSQLErrors are false. WMF wikis have the former set to true;
users of those wikis can still include the details in bug reports.
Fixing this for DBConnectionError was more or less straightforward.
However, in the case of DBQueryError, this involved splitting the
error message into multiple smaller messages (killing a raw HTML
message in the process).
Note that this is an incomplete fix: information disclosure is,
for now, still possible from DBUnexpectedError exceptions (are
these even supposed to go into the exception log?) or exceptions
that occur from within the exception handler. Yet this is still
an improvement.
Bug: 26811
Change-Id: I1756b296d5e8d1d22511a3c3b58b5bb0dd025fec
|
|
|
|
|
|
|
|
|
| |
And added/removed spaces around some other tokens,
like +, -, *, /, <, >, =, !
Fixed windows newline style
Change-Id: I0b9c8c408f3f6bfc0d685a074d7ec468fb848fc8
|
|
|
|
|
|
|
|
| |
* Refactored LoadBalancer::reportConnectionError()
* Removed PHP4-style reference from DatabaseError constructors
* Allowed to not pass a database to the DBError family of exceptions.
Change-Id: If9570b45ea7285de2b8b2391e704bc01f76be48a
|
|
|
|
|
|
|
|
|
|
|
| |
Doxygen expects parameter types to come before the
parameter name in @param tags. Used a quick regex
to switch everything around where possible. This
only fixes cases where a primitve variable (or a
primitive followed by other types) is the variable
type. Other cases will need to be fixed manually.
Change-Id: Ic59fd20856eb0489d70f3469a56ebce0efb3db13
|
|
|
|
|
|
|
|
| |
Added/removed spaces around logical/arithmetic operator
Reduced multiple empty lines to one empty line
Removed wrong tabs before comments at end of line
Removed too many spaces in assigments
Change-Id: I2bba4e72f9b5f88c53324d7b70e6042f1aad8f6b
|
|
|
|
| |
Change-Id: I670a7baf3ba1e70d18346bb00938d518ba2063bd
|
|
|
|
| |
Change-Id: Id7eda67a43f9040117edd79fdbeb678f1c3a6da2
|
|
|
|
|
|
| |
Or $this->msg in special pages.
Change-Id: I774a89d646615053c8424050e42ad95601f92543
|
|
|
|
| |
Change-Id: I31dc64f83ce8767dcdd84597844b0819840f60e1
|
|
|
|
| |
Change-Id: Ib8fe301c6db77603e411113cea5a39c25c664961
|
|
|
|
|
|
|
|
|
|
|
| |
Looks unneeded nowaday. Backtrace is correctly appended to HTML output
or CLI output when $wgShowDBErrorBacktrace is true.
Not sure what it was supposed to fix.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/110308
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/105189
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/104591
|
|
|
|
|
|
|
| |
Make the link to the MW page https only
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/102965
|
|
|
|
|
|
|
| |
Also tidy up a couple of returns (per others in method, and/or parents)
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/102910
|
|
|
|
|
|
|
|
|
| |
itself.
* Tweaked filecache fallback in fileCachedPage() to try the raw title param. If the DB is down, we can get most views of titles with colons in them to work this way. Previously, it could fail on an interwiki lookup.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/101667
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Rewrote class and split into three classes: a base class, and html cache and a more generic cache to be used later.
* The new classes now use RequestContext.
* Renamed fetchPageText() -> fetchText().
* Split out new saveText() function from saveToFileCache().
* Various other cleanups and fixes.
Also fixed backwards setting of $wgDisableCounters in rebuildFileCache.php.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/98405
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/97301
|
|
|
|
|
|
|
| |
* Changed an usage of $_REQUEST to $wgRequest
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/91409
|
|
|
|
|
|
|
| |
it contains. I really don't like to pass unescaped messages to the output *sigh*
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/90668
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/88816
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/88812
|
|
Updated AutoLoader to match
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/88800
|