def foo(): Future[Bob] = {
if (flag)
someAsyncCall()
else
throw new RuntimeException()
}In the above code, the exception was thrown outside a future, so it'll never reach a handle/rescue block that was defined somewhere up the call stack. The type here didn't prevent us from doing it because exceptions are an effect not seen by the type system.