1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-06 16:56:13 +02:00

cvsserver: Abort if connect to database fails

Currently all calls to the database backend make no
error checking or handling at all. At least abort
if the connection to the database failed since
there is really no way we could do anything useful
after that.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Frank Lichtenheld 2007-03-19 16:56:01 +01:00 committed by Junio C Hamano
parent eb1780d480
commit 920a449af5

View File

@ -2168,6 +2168,7 @@ sub new
$self->{dbh} = DBI->connect("$self->{dbdriver}:dbname=$self->{dbname}",
$self->{dbuser},
$self->{dbpass});
die "Error connecting to database\n" unless defined $self->{dbh};
$self->{tables} = {};
foreach my $table ( $self->{dbh}->tables )