From 4ab71f7e3debe31fd43a38eb228cb19c2a30f863 Mon Sep 17 00:00:00 2001 From: Wojtek Bazant <wojtek.bazant@sanger.ac.uk> Date: Thu, 27 Sep 2018 14:17:22 +0100 Subject: [PATCH] Fix bug: use return instead of next return goes back one frame up the stack next goes back to the closest frame on the stack that supports the operation (that is close enough in RefSeqGPFFParser alone) It works unless I subclass create_xrefs, and then my Hive workers die: Lost control. Check your Runnable for loose 'next' statements that are not part of a loop WORKER_ERROR --- misc-scripts/xref_mapping/XrefParser/RefSeqGPFFParser.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc-scripts/xref_mapping/XrefParser/RefSeqGPFFParser.pm b/misc-scripts/xref_mapping/XrefParser/RefSeqGPFFParser.pm index 3a051ddca9..b6c34c4a8d 100644 --- a/misc-scripts/xref_mapping/XrefParser/RefSeqGPFFParser.pm +++ b/misc-scripts/xref_mapping/XrefParser/RefSeqGPFFParser.pm @@ -135,7 +135,7 @@ sub create_xrefs { # Create a hash of all valid names and taxon_ids for this species my %species2name = $self->species_id2name($dbi); if (defined $species_name) { push @{$species2name{$species_id}}, $species_name; } - if (!defined $species2name{$species_id}) { next; } + if (!defined $species2name{$species_id}) { return; } my %species2tax = $self->species_id2taxonomy($dbi); push @{$species2tax{$species_id}}, $species_id; my @names = @{$species2name{$species_id}}; -- GitLab