Scala has no exceptions noted. However, when calling scala code from java, it is advisable to catch the exceptions thrown by scala.
Scala:
def f()= { //do something that throws SomeException }
Java:
try { f() } catch (SomeException e) {}
javac dislikes this and complains that "this exception is never thrown from the body of the try statement"
Is there a way to make scala declare that it has thrown a checked exception?
java scala exception-handling scala-java-interop compiler-errors
goncalopp
source share