summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2014-01-16 14:57:00 +0100
committerDaniel Friesel <derf@finalrewind.org>2014-01-16 14:57:00 +0100
commiteccf8ca2b1d6625a2d17d12ab2f0dbc5d49fac75 (patch)
treee6335abdeb79d57b8511e9f2340615d40977554a /bin
parent937a09c0845abd97a9b216d6e34b5747b95ac9f5 (diff)
Move EFA logic to ::EFA, just set URL in ::VRR
Diffstat (limited to 'bin')
-rwxr-xr-xbin/efa16
1 files changed, 8 insertions, 8 deletions
diff --git a/bin/efa b/bin/efa
index 5982c12..7fc54f1 100755
--- a/bin/efa
+++ b/bin/efa
@@ -43,7 +43,7 @@ sub show_help {
sub handle_efa_exception {
my ($e) = @_;
- if ( $e->isa('Travel::Routing::DE::VRR::Exception::Setup') ) {
+ if ( $e->isa('Travel::Routing::DE::EFA::Exception::Setup') ) {
if ( $e->message ) {
printf STDERR (
"Error: %s (option '%s'): %s\n",
@@ -59,23 +59,23 @@ sub handle_efa_exception {
exit 1;
}
- if ( $e->isa('Travel::Routing::DE::VRR::Exception::Net') ) {
+ if ( $e->isa('Travel::Routing::DE::EFA::Exception::Net') ) {
printf STDERR ( "Error: %s: %s\n", $e->description,
$e->http_response->as_string );
exit 2;
}
- if ( $e->isa('Travel::Routing::DE::VRR::Exception::NoData') ) {
+ if ( $e->isa('Travel::Routing::DE::EFA::Exception::NoData') ) {
printf STDERR ( "Error: %s\n", $e->description );
exit 3;
}
- if ( $e->isa('Travel::Routing::DE::VRR::Exception::Ambiguous') ) {
+ if ( $e->isa('Travel::Routing::DE::EFA::Exception::Ambiguous') ) {
printf STDERR (
"Error: %s for key %s. Specify one of %s\n",
$e->description, $e->post_key, $e->possibilities
);
exit 4;
}
- if ( $e->isa('Travel::Routing::DE::VRR::Exception::Other') ) {
+ if ( $e->isa('Travel::Routing::DE::EFA::Exception::Other') ) {
printf STDERR ( "Error: %s: %s\n", $e->description, $e->message );
exit 5;
}
@@ -90,17 +90,17 @@ sub check_for_error {
if ( not defined $efa ) {
if ( $eval_error
and ref($eval_error)
- and $eval_error->isa('Travel::Routing::DE::VRR::Exception') )
+ and $eval_error->isa('Travel::Routing::DE::EFA::Exception') )
{
handle_efa_exception($eval_error);
}
elsif ($eval_error) {
printf STDERR
- "Unknown Travel::Routing::DE::VRR error:\n${eval_error}";
+ "Unknown Travel::Routing::DE::EFA error:\n${eval_error}";
exit 10;
}
else {
- say STDERR 'Travel::Routing::DE::VRR failed to return an object';
+ say STDERR 'Travel::Routing::DE::EFA failed to return an object';
exit 10;
}
}