installer: shows status message on DB connection error
authorAntoine Musso <hashar@free.fr>
Wed, 2 Oct 2013 10:33:48 +0000 (12:33 +0200)
committerHashar <hashar@free.fr>
Wed, 13 Nov 2013 14:06:48 +0000 (14:06 +0000)
commit631156fc74ea809bd277315d5a41aca968ef628d
treebea63a5fca99e069a20fd1101a8d5a4683f19a24
parent8b4ee2bb3b1ffdfee19989ad84cd90d545b0c124
installer: shows status message on DB connection error

While installing MediaWiki with a sqlite backend and missing the sqlite
extension, I have received the very helpful message:

  DatabaseInstaller::setupSchemaVars: unexpected DB connection error

Which to me is as helpful as:

  error

Since the database connection returns a Status object and that it got a
message attached, we might as well pass the error message when raising
the exception.  We would end up with an error like:

 DB connection error: could not find driver.
 Check the data directory and database name below and try again.

That let me instantly facepalm and install the sqlite PHP extension
instead of wasting time figuring out what is happening.

Change-Id: Ife8e97242e1cfbdfbb572ad50cf8e4a7ad5b9dfc
includes/installer/DatabaseInstaller.php