Skip to content

Commit

Permalink
Item631: Fix check of compile error
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk@1689 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
OlivierRaginel authored and OlivierRaginel committed Jan 1, 2009
1 parent 3c948da commit 46b85ef
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -73,17 +73,17 @@ package Foswiki;
unshift( @path, $1 ) if $1;
my $script = File::Spec->catfile(@path);

unless ( do $script ) {
unless ( my $return = do $script ) {
my $message = <<MESSAGE;
************************************************************
Could not load $script
MESSAGE
if ($!) {
$message .= "There was a file error: $!\n";
}
elsif ($@) {
if ($@) {
$message .= "There was a compile error: $@\n";
}
elsif (defined $return) {
$message .= "There was a file error: $!\n";
}
else {
$message .= "An unspecified error occurred\n";
}
Expand Down

0 comments on commit 46b85ef

Please sign in to comment.