From 049ae4ae5d0367485910064f62b1baf38fdaad04 Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Mon, 19 Apr 2010 16:21:58 -0700 Subject: Bug 560284: Make all errors that checksetup.pl throws be red r=mkanat, a=mkanat (module owner) --- Bugzilla/DB.pm | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'Bugzilla/DB.pm') diff --git a/Bugzilla/DB.pm b/Bugzilla/DB.pm index 85ad77e17..fc2e05899 100644 --- a/Bugzilla/DB.pm +++ b/Bugzilla/DB.pm @@ -147,7 +147,7 @@ sub bz_check_requirements { my $dbd_mod = $dbd->{module}; my $dbd_ver = $dbd->{version}; my $version = $dbd_ver ? " $dbd_ver or higher" : ''; - print < -1 ) { print "ok: found v$sql_vers\n" if $output; } else { - print <errstr || $@; chomp($error); - print STDERR "The '$db_name' database could not be created.", - " The error returned was:\n\n $error\n\n", - _bz_connect_error_reasons(); - exit; + die "The '$db_name' database could not be created.", + " The error returned was:\n\n $error\n\n", + _bz_connect_error_reasons(); } } @@ -237,9 +234,8 @@ sub _get_no_db_connection { # Can't use $dbh->errstr because $dbh is undef. my $error = $DBI::errstr || $@; chomp($error); - print STDERR "There was an error connecting to $sql_server:\n\n", - " $error\n\n", _bz_connect_error_reasons(); - exit; + die "There was an error connecting to $sql_server:\n\n", + " $error\n\n", _bz_connect_error_reasons(), "\n"; } return $dbh; } @@ -1309,13 +1305,11 @@ sub _check_references { } } else { - print "\n", get_text('install_fk_invalid', + die "\n", get_text('install_fk_invalid', { table => $table, column => $column, foreign_table => $foreign_table, foreign_column => $foreign_column, 'values' => $bad_values }), "\n"; - # I just picked a number above 2, to be considered "abnormal exit" - exit 3 } } } -- cgit v1.2.3-24-g4f1b