diff options
-rwxr-xr-x | lib/Travelynx.pm | 4 | ||||
-rw-r--r-- | lib/Travelynx/Helper/IRIS.pm | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm index 0dc0f92..9958b7e 100755 --- a/lib/Travelynx.pm +++ b/lib/Travelynx.pm @@ -488,7 +488,7 @@ sub startup { } )->catch( sub { - my ($status) = @_; + my ( $err, $status ) = @_; $promise->reject( $status->{errstr} ); return; } @@ -2009,7 +2009,7 @@ sub startup { } )->catch( sub { - my ($dep) = @_; + my ( $err, $dep ) = @_; $self->traewelling->log( uid => $uid, message => diff --git a/lib/Travelynx/Helper/IRIS.pm b/lib/Travelynx/Helper/IRIS.pm index 456ef07..4c286cb 100644 --- a/lib/Travelynx/Helper/IRIS.pm +++ b/lib/Travelynx/Helper/IRIS.pm @@ -138,6 +138,7 @@ sub get_departures_p { sub { my ($err) = @_; $promise->reject( + $err, { results => [], errstr => "Error in promise: $err", @@ -150,6 +151,7 @@ sub get_departures_p { } elsif ( @station_matches > 1 ) { return Mojo::Promise->reject( + 'ambiguous station name', { results => [], errstr => @@ -160,6 +162,7 @@ sub get_departures_p { } else { return Mojo::Promise->reject( + 'unknown station', { results => [], errstr => 'Unbekannte Station', |