From 870a00e468a623d4684d3a3a542ff3e4ae6485ee Mon Sep 17 00:00:00 2001
From: Andrew Yates <ayates@ebi.ac.uk>
Date: Fri, 8 Jun 2012 11:12:00 +0000
Subject: [PATCH] Improved error reporting. Nice to inform the user what has
 gone wrong with the given data

---
 modules/Bio/EnsEMBL/Feature.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/Bio/EnsEMBL/Feature.pm b/modules/Bio/EnsEMBL/Feature.pm
index c770f80bf5..84627b7d44 100644
--- a/modules/Bio/EnsEMBL/Feature.pm
+++ b/modules/Bio/EnsEMBL/Feature.pm
@@ -140,7 +140,7 @@ sub new {
   if(defined($start) && defined($end)) {
       if (($start =~ /\d+/) && ($end =~ /\d+/)) {
 	  if($end+1 < $start) {
-	      throw('Start must be less than or equal to end+1');
+	      throw(sprintf('Start (%d) must be less than or equal to end+1 (%d)', $start, ($end+1)));
 	  }
       } else {
 	      throw('Start and end must be integers');
-- 
GitLab