Skip to content

Commit

Permalink
Merge pull request #10701 from playframework/mergify/bp/2.8.x/pr-10690
Browse files Browse the repository at this point in the history
Catch Throwable instead of NonFatal when starting prod server (bp #10690)
  • Loading branch information
mergify[bot] committed Feb 15, 2021
2 parents 0f45dd9 + 09aeec6 commit 417fe4c
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import java.nio.file.Files
import java.nio.file.StandardOpenOption

import scala.concurrent.Future
import scala.util.control.NonFatal

import akka.Done
import akka.actor.CoordinatedShutdown
Expand Down Expand Up @@ -82,14 +81,14 @@ object ProdServerStart {

server
} catch {
case NonFatal(e) =>
case e: Throwable =>
// Clean up pidfile when the server fails to start
pidFile.foreach(_.delete())
throw e
}
} catch {
case ServerStartException(message, cause) => process.exit(message, cause)
case NonFatal(e) => process.exit("Oops, cannot start the server.", Some(e))
case e: Throwable => process.exit("Oops, cannot start the server.", Some(e))
}
}

Expand Down

0 comments on commit 417fe4c

Please sign in to comment.