summaryrefslogtreecommitdiff
path: root/fml/libexec
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-11-09 00:03:31 +0000
committerfukachan <fukachan>2001-11-09 00:03:31 +0000
commitd84312329e65ca3ecb63ed578573e6e4132a505e (patch)
tree67ada56576d3c820771a02c74cb891c49c62a71d /fml/libexec
parent0ec512b6a5c2c81d1d88c93009c6e99df9a3f9ce (diff)
downloadfml8-d84312329e65ca3ecb63ed578573e6e4132a505e.tar.gz
fml8-d84312329e65ca3ecb63ed578573e6e4132a505e.tar.bz2
fml8-d84312329e65ca3ecb63ed578573e6e4132a505e.zip
least error infomation by default OR raw $@ if debug
Diffstat (limited to 'fml/libexec')
-rwxr-xr-xfml/libexec/loader12
1 files changed, 10 insertions, 2 deletions
diff --git a/fml/libexec/loader b/fml/libexec/loader
index fd9cb8f4..e1617600 100755
--- a/fml/libexec/loader
+++ b/fml/libexec/loader
@@ -4,7 +4,7 @@
# Copyright (C) 2000-2001 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: loader,v 1.17 2001/10/08 12:42:52 fukachan Exp $
+# $FML: loader,v 1.18 2001/10/08 15:44:03 fukachan Exp $
#
eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}'
@@ -89,7 +89,15 @@ sub Bootstrap
unless ($@) {
eval q{ &Bootstrap2($main_cf_file);};
if ($@) {
- croak("fail to execute Bootstrap2($main_cf_file)\n$@\n");
+ my $reason = $@;
+ if ($ENV{'debug'} || defined( $main_cf->{ debug } )) {
+ croak("fail to execute Bootstrap2($main_cf_file)\n$@\n");
+ }
+ else {
+ $reason =~ s/[\n\s]*at.*$//m;
+ print STDERR "Error: ", $reason, "\n";
+ exit(1);
+ }
}
}
else {