Good call, just updated. The only errors thrown by the metadata calls will
be SQLException, so the existing try-catch can deal with those.


Best,

-Dan-


On Sat, Nov 16, 2013 at 9:37 AM, Greg Methvin <notifications@github.com>wrote:

> In
> framework/src/play-jdbc/src/main/scala/play/api/db/evolutions/Evolutions.scala:
>
> > @@ -511,25 +511,41 @@ class EvolutionsPlugin(app: Application) extends Plugin with HandleWebCommandSup
> >      }
> >    }
> >
> > +  def isMySQLDatabase(c: Connection): Boolean = {
> > +    try {
> > +      val metadata = c.getMetaData()
> > +      val productName = metadata.getDatabaseProductName
> > +      return productName.contains("MySQL")
> > +    } catch { case e: Exception => }
>
> What exceptions might happen here? If it's a problem with obtaining a
> database session, I'd just let the caller handle that (move it into the
> try block below).
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/playframework/playframework/pull/2008/files#r7709406>
> .
>