Commit 5185250b authored by Andreas Kusalananda Kähäri's avatar Andreas Kusalananda Kähäri
Browse files

Die if a species section refers to a non-existant source section.

parent be874926
...@@ -110,6 +110,14 @@ foreach my $species_section ( sort( $config->GroupMembers('species') ) ) ...@@ -110,6 +110,14 @@ foreach my $species_section ( sort( $config->GroupMembers('species') ) )
{ {
my $source_section = sprintf( "source %s", $source_name ); my $source_section = sprintf( "source %s", $source_name );
if ( !defined( $config->val( $source_section, 'id' ) ) ) {
die(
sprintf( "Can not find source section '[%s]'\n"
. "while reading species section '[%s]'\n",
$source_section, $species_section
) );
}
printf( "# Data from source '%s' (id = %d)\n", printf( "# Data from source '%s' (id = %d)\n",
$source_name, $config->val( $source_section, 'id' ) ); $source_name, $config->val( $source_section, 'id' ) );
......
Markdown is supported
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