0

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 _=>""
})
jwvh
  • 50,871
  • 7
  • 38
  • 64

0 Answers0