catch
clause SC-W1089Cases within the catch
clause potentially allow you to recover from an error within your application.
Because you have Error
-s apart from Exception
-s under Throwable
-s, you may end up trying to recover from a point of no return such as
running under extremely low memory limits. Therefore, it is always a good practice to specify types.
try {
// ...
} catch {
case e =>
}
try {
// ...
} catch {
case e: IllegalArgumentException =>
}