Skip to content
Snippets Groups Projects
Commit c2aee0a1 authored by Eugene Kulesha's avatar Eugene Kulesha
Browse files

check a feature has a valid start and end

parent b2970c62
No related branches found
No related tags found
No related merge requests found
......@@ -124,8 +124,12 @@ sub new {
}
if(defined($start) && defined($end)) {
if($end+1 < $start) {
throw('Start must be less than or equal to end+1');
if (($start =~ /\d+/) && ($end =~ /\d+/)) {
if($end+1 < $start) {
throw('Start must be less than or equal to 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