diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-05-26 14:01:22 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-05-26 14:01:22 +0000 |
commit | 5a0770be180872c53bfb6188397e5efc380d53d1 (patch) | |
tree | 8b144ca9c2b917c87e42dd9511e69ee02dd5bd9b /perl-install/commands | |
parent | 42eda4364a83f240c6aed144c53ac9208cf491f4 (diff) | |
download | drakx-5a0770be180872c53bfb6188397e5efc380d53d1.tar drakx-5a0770be180872c53bfb6188397e5efc380d53d1.tar.gz drakx-5a0770be180872c53bfb6188397e5efc380d53d1.tar.bz2 drakx-5a0770be180872c53bfb6188397e5efc380d53d1.tar.xz drakx-5a0770be180872c53bfb6188397e5efc380d53d1.zip |
use formatError to display the error message
(to have a better error message than "SCALAR(0x....) at ...")
Diffstat (limited to 'perl-install/commands')
-rwxr-xr-x | perl-install/commands | 7 |
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" } |