summaryrefslogtreecommitdiff
path: root/lib/Travel/Status
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travel/Status')
-rw-r--r--lib/Travel/Status/DE/HAFAS.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Travel/Status/DE/HAFAS.pm b/lib/Travel/Status/DE/HAFAS.pm
index c67ac8d..21b0684 100644
--- a/lib/Travel/Status/DE/HAFAS.pm
+++ b/lib/Travel/Status/DE/HAFAS.pm
@@ -108,6 +108,10 @@ sub new {
$service = 'DB';
}
+ if ( defined $service and not exists $hafas_instance{$service} ) {
+ confess("The service '$service' is not supported");
+ }
+
my $ref = {
active_service => $service,
developer_mode => $conf{developer_mode},