paypal/squbs

Unicomplex should not eat exception when starting listeners

crankydillo opened this issue · 0 comments

I recently had to debug this stacktrace:

Exception in thread "main" java.util.concurrent.TimeoutException: Futures timed out after [10 seconds]
	at scala.concurrent.impl.Promise$DefaultPromise.ready(Promise.scala:255)
	at scala.concurrent.impl.Promise$DefaultPromise.ready(Promise.scala:183)
	at scala.concurrent.Await$.$anonfun$ready$1(package.scala:191)
	at scala.concurrent.BlockContext$DefaultBlockContext$.blockOn(BlockContext.scala:53)
	at scala.concurrent.Await$.ready(package.scala:142)
	at org.squbs.unicomplex.UnicomplexBoot$.startServiceInfra(UnicomplexBoot.scala:471)
	at org.squbs.unicomplex.UnicomplexBoot.start(UnicomplexBoot.scala:598)
	at org.squbs.unicomplex.UnicomplexBoot.start(UnicomplexBoot.scala:547)
	at org.squbs.unicomplex.Bootstrap$.delayedEndpoint$org$squbs$unicomplex$Bootstrap$1(Bootstrap.scala:36)
	at org.squbs.unicomplex.Bootstrap$delayedInit$body.apply(Bootstrap.scala:30)
	at scala.Function0.apply$mcV$sp(Function0.scala:34)
	at scala.Function0.apply$mcV$sp$(Function0.scala:34)
	at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
	at scala.App.$anonfun$main$1$adapted(App.scala:76)
	at scala.collection.immutable.List.foreach(List.scala:389)
	at scala.App.main(App.scala:76)
	at scala.App.main$(App.scala:74)
	at org.squbs.unicomplex.Bootstrap$.main(Bootstrap.scala:30)
	at org.squbs.unicomplex.Bootstrap.main(Bootstrap.scala)

Debugging led to a one-line match statement, which makes it slightly difficult to debug with my IDE. Regardless, I shouldn't have to use a debugger to see that error message, so we need to do something better with this exception.