Disclaimer: absolute novice in Scala :(
I have the following defined:
def tryAndReport(body: Unit) : Unit = {
try {
body
} catch {
case e: MySpecificException => doSomethingUseful
}
}
I call it like this:
tryAndReport{
someCodeThatThrowsMySpecificException()
}
While the call to someCodeThatThrowsMySpecificException happens just fine, the exception is not being caught in tryAndReport.
Why?
Thank you!