summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-06-29 03:07:17 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-06-29 03:07:17 +0200
commit13256020f6eef6da48573aa96f29407da760dde7 (patch)
tree2cd397695e37bd388bb8c652496c6041b79b5037 /bin
parent329134383358e3a64a342cf02efe505a8f9b9425 (diff)
efa: Handle more setup errors
Diffstat (limited to 'bin')
-rwxr-xr-xbin/efa9
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/efa b/bin/efa
index 40c2ef1..f073712 100755
--- a/bin/efa
+++ b/bin/efa
@@ -40,8 +40,10 @@ sub handle_efa_exception {
if ( $e->isa('Travel::Routing::DE::VRR::Exception::Setup') ) {
if ( $e->message ) {
- printf STDERR ( "Error: %s (option '%s'): %s\n", $e->description,
- $e->message );
+ printf STDERR (
+ "Error: %s (option '%s'): %s\n",
+ $e->description, $e->option, $e->message
+ );
}
else {
printf STDERR (
@@ -133,6 +135,9 @@ if ( not( @from and @to ) ) {
elsif ( @ARGV == 6 ) {
( @from[ 0, 1 ], @via[ 0, 1 ], @to[ 0, 1 ] ) = @ARGV;
}
+ else {
+ show_help(1);
+ }
}
for my $pair ( [ \@from, \$from_type ], [ \@via, \$via_type ],