Skip to content

Commit c9c3cda

Browse files
committed
Print login / shutdown errors
1 parent 68dbb0c commit c9c3cda

File tree

1 file changed

+10
-1
lines changed
  • tray-util/src/main/scala/com/github/opengrabeso/loctio

1 file changed

+10
-1
lines changed

tray-util/src/main/scala/com/github/opengrabeso/loctio/Start.scala

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,10 @@ object Start extends SimpleSwingApplication {
176176
}(global)
177177

178178
requestNotifications(token)
179+
}.tap {
180+
_.failed.at(global).foreach { ex =>
181+
println(s"Login failure $ex")
182+
}
179183
}
180184
} else {
181185
Future.successful(())
@@ -235,7 +239,12 @@ object Start extends SimpleSwingApplication {
235239

236240
private def sendShutdown(): Future[Unit] = {
237241
println("Send shutdown")
238-
userApi.at(global).flatMap(_.shutdown(rest.UserRestAPI.RestString("now")))
242+
userApi.at(global).flatMap(_.shutdown(rest.UserRestAPI.RestString("now"))).tap {
243+
_.failed.at(global).foreach { ex =>
244+
println(s"Shutdown: error $ex")
245+
ex.printStackTrace()
246+
}
247+
}
239248
}
240249

241250
private def appExit() = {

0 commit comments

Comments
 (0)