summaryrefslogtreecommitdiffstats
path: root/os-plugins/OpenSLX
diff options
context:
space:
mode:
authorOliver Tappe2008-03-20 19:48:54 +0100
committerOliver Tappe2008-03-20 19:48:54 +0100
commit430f630238b3c17a8cfb962d034e70200c627ad8 (patch)
tree8223c370dcae4025b80d246acf83679e4e1cbf23 /os-plugins/OpenSLX
parent * fixed error on slxos-install (distro-info not found) (diff)
downloadcore-430f630238b3c17a8cfb962d034e70200c627ad8.tar.gz
core-430f630238b3c17a8cfb962d034e70200c627ad8.tar.xz
core-430f630238b3c17a8cfb962d034e70200c627ad8.zip
* improved error handling when trying to load plugin-specific distro modules (now
the actual error should be shown) git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1663 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/OpenSLX')
-rw-r--r--os-plugins/OpenSLX/OSPlugin/Engine.pm15
1 files changed, 13 insertions, 2 deletions
diff --git a/os-plugins/OpenSLX/OSPlugin/Engine.pm b/os-plugins/OpenSLX/OSPlugin/Engine.pm
index f51e155f..61b835a4 100644
--- a/os-plugins/OpenSLX/OSPlugin/Engine.pm
+++ b/os-plugins/OpenSLX/OSPlugin/Engine.pm
@@ -472,15 +472,26 @@ sub _loadPlugin
push @distroModules, $distroName;
push @distroModules, 'Base';
for my $distroModule (@distroModules) {
- last if eval {
+ my $loaded = eval {
vlog(1, "trying distro-module $distroModule...");
$distro = instantiateClass(
'OpenSLX::Distro::' . $distroModule,
- { pathToClass => $self->{'plugin-path'} }
+ {
+ pathToClass => $self->{'plugin-path'},
+ acceptMissing => 1,
+ }
);
+ return 0 if !$distro;
vlog(1, "using $distroModule.");
1;
};
+ last if $loaded;
+ if (!defined $loaded) {
+ vlog(0, _tr(
+ "Error when trying to load distro module '%s':\n%s",
+ $distroModule, $@
+ ));
+ }
}
shift @INC;
if (!$distro) {