summaryrefslogtreecommitdiff
path: root/lib/Travelynx.pm
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-09-10 21:20:26 +0200
committerDaniel Friesel <derf@finalrewind.org>2020-09-10 21:20:26 +0200
commit874de1129819d4d4559e88d75f8f30b51f66ba90 (patch)
treeda0bfac5bfa237138b64097e3b330b54ade7cba3 /lib/Travelynx.pm
parenteb93ee40c9117db4947a5ce365aaec1a057fae94 (diff)
handle rejected promises; do not accidentally duplicate rejections
Diffstat (limited to 'lib/Travelynx.pm')
-rwxr-xr-xlib/Travelynx.pm27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm
index 9d1084c..f621139 100755
--- a/lib/Travelynx.pm
+++ b/lib/Travelynx.pm
@@ -1260,6 +1260,13 @@ sub startup {
{ user_id => $uid }
);
}
+ return;
+ }
+ )->catch(
+ sub {
+ my ($err) = @_;
+ $self->app->log->warn("add_route_timestamps: $err");
+ return;
}
)->wait;
}
@@ -1394,6 +1401,11 @@ sub startup {
{ user_id => $uid }
);
}
+ )->catch(
+ sub {
+ my ($err) = @_;
+ $self->app->log->warn("add_route_timestamps: $err");
+ }
)->wait;
if ( $train->sched_departure ) {
@@ -1476,6 +1488,11 @@ sub startup {
);
}
}
+ )->catch(
+ sub {
+ # no wagonorder? no problem.
+ return;
+ }
)->wait;
}
@@ -1497,6 +1514,11 @@ sub startup {
{ user_id => $uid }
);
}
+ )->catch(
+ sub {
+ # no stationinfo? no problem.
+ return;
+ }
)->wait;
}
@@ -1518,6 +1540,11 @@ sub startup {
{ user_id => $uid }
);
}
+ )->catch(
+ sub {
+ # no stationinfo? no problem.
+ return;
+ }
)->wait;
}
}