Skip to content

Commit

Permalink
feature/throw obp exception earlier, instead of StackOverflowError.
Browse files Browse the repository at this point in the history
  • Loading branch information
hongwei1 committed Sep 19, 2023
1 parent 86ed812 commit 17261bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions obp-api/src/main/scala/bootstrap/liftweb/CustomDBVendor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ trait CustomProtoDBVendor extends ConnectionManager {
logger.debug("Temporarily expanding pool. name=%s, tempMaxSize=%d".format(name, tempMaxSize))
newConnection(name)
}else{
logger.debug(s"The poolSize is expanding to tempMaxSize ($tempMaxSize), we can not create new connection, need to restart OBP now.")
throw new RuntimeException(s"Database may be down, please check database connection! OBP already create $tempMaxSize connections, because all connections are occupied!")
logger.error(s"The poolSize is expanding to tempMaxSize ($tempMaxSize), we can not create new connection, need to restart OBP now.")
Failure(s"Database may be down, please check database connection! OBP already create $tempMaxSize connections, because all connections are occupied!")
}

case x :: xs =>
Expand Down

0 comments on commit 17261bb

Please sign in to comment.