Index: trunk/phase3/includes/db/DatabasePostgres.php |
— | — | @@ -183,7 +183,7 @@ |
184 | 184 | wfDebug( "DB connection error\n" ); |
185 | 185 | wfDebug( "Server: $server, Database: $dbName, User: $user, Password: " . substr( $password, 0, 3 ) . "...\n" ); |
186 | 186 | wfDebug( $this->lastError()."\n" ); |
187 | | - return false; |
| 187 | + throw new DBConnectionError( $this, $phpError ); |
188 | 188 | } |
189 | 189 | |
190 | 190 | $this->mOpened = true; |
Index: trunk/phase3/includes/db/DatabaseSqlite.php |
— | — | @@ -89,7 +89,7 @@ |
90 | 90 | } |
91 | 91 | if ( $this->mConn === false ) { |
92 | 92 | wfDebug( "DB connection error: $err\n" ); |
93 | | - return false; |
| 93 | + throw new DBConnectionError( $this, $err ); |
94 | 94 | } |
95 | 95 | $this->mOpened = !!$this->mConn; |
96 | 96 | # set error codes only, don't raise exceptions |