From 9191530f10c83f28cdb6ba291fa78f0afa343660 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Sun, 29 Oct 2006 14:22:01 +0000 Subject: * improved error-handling in case of problems with the db-backend. git-svn-id: http://svn.openslx.org/svn/openslx/trunk@486 95ad53e4-c205-0410-b2fa-d234c58c8868 --- config-db/OpenSLX/ConfigDB.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'config-db') diff --git a/config-db/OpenSLX/ConfigDB.pm b/config-db/OpenSLX/ConfigDB.pm index 9d1b266e..39f59485 100644 --- a/config-db/OpenSLX/ConfigDB.pm +++ b/config-db/OpenSLX/ConfigDB.pm @@ -175,11 +175,17 @@ sub connectConfigDB # name of underlying database module my $dbModule = "OpenSLX::MetaDB::$dbType"; unless (eval "require $dbModule") { - confess _tr('Unable to load DB-module <%s> (%s)', $dbModule, $@); + if ($! == 2) { + die _tr("Unable to load DB-module <%s>\n" + ."that database type is not supported (yet?)\n", $dbModule); + } else { + die _tr("Unable to load DB-module <%s> (%s)\n", $dbModule, $@); + } } my $modVersion = $dbModule->VERSION; if ($modVersion < $VERSION) { - confess _tr('Could not load module <%s> (Version <%s> required, but <%s> found)', + confess _tr('Could not load module <%s> (Version <%s> required, ' + .'but <%s> found)', $dbModule, $VERSION, $modVersion); } $dbModule->import; -- cgit v1.2.3-55-g7522