Scala

Scala

Made by DeepSource

Exception naming does not follow the recommended style SC-C1000

Style
Minor

Exceptions usually follow the AbcDefException nomenclature. Some examples are - NullPointerException, RuntimeException, etc. This allows the person reading/viewing the code understand that the entity being dealt with is an Exception rather than having to rely on the context.

Bad Practice

Try(/* do something */) match {
  ...
  case Failure(e: Foo) => ...
}

Recommended

Try(/* do something */) match {
  ...
  case Failure(e: FooException) => ...
}