summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-05-26 14:01:22 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-05-26 14:01:22 +0000
commit5a0770be180872c53bfb6188397e5efc380d53d1 (patch)
tree8b144ca9c2b917c87e42dd9511e69ee02dd5bd9b
parent42eda4364a83f240c6aed144c53ac9208cf491f4 (diff)
downloaddrakx-backup-do-not-use-5a0770be180872c53bfb6188397e5efc380d53d1.tar
drakx-backup-do-not-use-5a0770be180872c53bfb6188397e5efc380d53d1.tar.gz
drakx-backup-do-not-use-5a0770be180872c53bfb6188397e5efc380d53d1.tar.bz2
drakx-backup-do-not-use-5a0770be180872c53bfb6188397e5efc380d53d1.tar.xz
drakx-backup-do-not-use-5a0770be180872c53bfb6188397e5efc380d53d1.zip
use formatError to display the error message
(to have a better error message than "SCALAR(0x....) at ...")
-rwxr-xr-xperl-install/commands7
1 files changed, 5 insertions, 2 deletions
diff --git a/perl-install/commands b/perl-install/commands
index c37a180c7..adbf7f594 100755
--- a/perl-install/commands
+++ b/perl-install/commands
@@ -9,7 +9,10 @@ use commands;
my $progname = basename($0);
-# hack as some functions are defined by perl... so chmod -> chmod_
-&{$commands::{$progname} || $commands::{$progname . "_"} || \&err}(@ARGV), exit 0;
+eval {
+ # hack as some functions are defined by perl... so chmod -> chmod_
+ &{$commands::{$progname} || $commands::{$progname . "_"} || \&err}(@ARGV), exit 0;
+};
+die formatError($@) . "\n";
sub err { die "$0: unknown program (unimplemented)\n" }