Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

throw error if no db drivers match

  • Loading branch information...
commit 3391be7b823af966e32f3b925bc02db39d89290c 1 parent a26fd70
@jamesward authored
Showing with 1 addition and 2 deletions.
  1. +1 −2  app/Global.scala
View
3  app/Global.scala
@@ -9,11 +9,10 @@ import play.api.Application
object Global extends GlobalSettings {
override def onStart(app: Application) {
-
SessionFactory.concreteFactory = app.configuration.getString("db.default.driver") match {
case Some("org.h2.Driver") => Some(() => getSession(new H2Adapter, app))
case Some("org.postgresql.Driver") => Some(() => getSession(new PostgreSqlAdapter, app))
- case _ => None
+ case _ => sys.error("Database driver must be either org.h2.Driver or org.postgresql.Driver")
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.