Skip to content
Snippets Groups Projects
Commit 870a00e4 authored by Andy Yates's avatar Andy Yates
Browse files

Improved error reporting. Nice to inform the user what has gone wrong with the given data

parent 156b164b
No related branches found
No related tags found
No related merge requests found
......@@ -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');
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment