From f5a5a9532e816fa35bcebc3e873f111b8476c232 Mon Sep 17 00:00:00 2001 From: Jan-hinnerk Vogel <jhv@sanger.ac.uk> Date: Wed, 12 Nov 2008 12:00:35 +0000 Subject: [PATCH] throw() instead of die() if program can't be found ...... --- modules/Bio/EnsEMBL/Analysis/Programs.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/Bio/EnsEMBL/Analysis/Programs.pm b/modules/Bio/EnsEMBL/Analysis/Programs.pm index d38377ca68..56c93e080a 100755 --- a/modules/Bio/EnsEMBL/Analysis/Programs.pm +++ b/modules/Bio/EnsEMBL/Analysis/Programs.pm @@ -5,6 +5,7 @@ use vars qw( %Program_Paths ); use Carp; use Cwd; use Sys::Hostname; +use Bio::EnsEMBL::Utils::Exception qw ( throw ) ; sub import { my $pkg = shift; @@ -55,10 +56,9 @@ sub import { } # Give informative death message if programs weren't found - if (@missing) { - die "Unable to locate the following programs as '", - (getpwuid($<))[0], "' on host '", hostname(), "'\n", - map "--> $_\n", @missing; + if (@missing) { + throw("Unable to locate the following programs as '". (getpwuid($<))[0]. "' on host '". hostname(). "' :\t". + join ( " --> " , @missing )) ; } } -- GitLab