Skip to content

Commit

Permalink
improved startup error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
pshirshov committed Nov 19, 2024
1 parent 6749845 commit cc9c233
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ object AppFailureHandler {
}

object NullHandler extends AppFailureHandler {
override def onError(t: Throwable): Unit = {
override def onError(t: Throwable): Nothing = {
rethrow(t)
}
}
Expand All @@ -36,12 +36,14 @@ object AppFailureHandler {
private def report(t: Throwable): Unit = {
t match {
case d: ProvisioningException =>
d.getSuppressed.toList.headOption match {
case Some(d: DIAppBootstrapException) =>
d.getSuppressed.toList match {
case (d: DIAppBootstrapException) :: Nil=>
System.err.println(d.getMessage)
case _ => // JVM will print the exception regardless
case _ =>
d.printStackTrace()
}
case _ =>
t.printStackTrace()
}
}

Expand Down

0 comments on commit cc9c233

Please sign in to comment.