I am trying to find ways to write a code for retry only for connection exception. But every exception from Sql server is under SQLSERVEREXCEPTION.
Is there any way to differentiate connection exception from others.
//code idea
val result = RetryFuture(insertQuery(student:Student).recover{
case SQLSERVEREXCEPTION: throw ex
case _=>""
})