diff options
author | Oliver Tappe | 2008-08-12 15:37:19 +0200 |
---|---|---|
committer | Oliver Tappe | 2008-08-12 15:37:19 +0200 |
commit | a18596f39fc93de7af6036b6d295a3042e64d3e9 (patch) | |
tree | 4f2090be5b86de7d6ee7d675640bffa745880505 /lib/OpenSLX/Basics.pm | |
parent | * update to busybox 1.11.1 (diff) | |
download | core-a18596f39fc93de7af6036b6d295a3042e64d3e9.tar.gz core-a18596f39fc93de7af6036b6d295a3042e64d3e9.tar.xz core-a18596f39fc93de7af6036b6d295a3042e64d3e9.zip |
* fixed possible hiding of error messages when something goes wrong in a
module that is being loaded dynamically (specifically the case when a plugin
is trying to load the most appropriate Distro module)
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2033 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'lib/OpenSLX/Basics.pm')
-rw-r--r-- | lib/OpenSLX/Basics.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/OpenSLX/Basics.pm b/lib/OpenSLX/Basics.pm index 07ab364b..5b43f155 100644 --- a/lib/OpenSLX/Basics.pm +++ b/lib/OpenSLX/Basics.pm @@ -605,13 +605,14 @@ sub instantiateClass $moduleName .= '.pm'; vlog(3, "trying to load $moduleName..."); + local @INC = @INC; foreach my $incPath (@$incPaths) { next if grep { $_ eq $incPath } @INC; unshift @INC, $incPath; } if (!eval { require $moduleName; 1 } ) { # check if module does not exists anywhere in search path - if (!-e $moduleName) { + if ($! == 2) { return if $flags->{acceptMissing}; die _tr("Module '%s' not found!\n", $moduleName); } @@ -733,10 +734,10 @@ sub loadDistroModule }; last if $loaded; if (!defined $loaded) { - vlog(0, _tr( + die _tr( "Error when trying to load distro module '%s':\n%s", $distroModule, $@ - )); + ); } } |