Skip to content

Future does not document behavior on fatal errors #12779

@som-snytt

Description

@som-snytt

Reproduction steps

Scala version: 2.13.10

import concurrent._, ExecutionContext.Implicits._, duration._

class C {
  def test(): Future[Int] =
    Future.unit
    .map { x =>
      throw new NoSuchMethodError("test")
      42
    }
}

object Test extends App {
  val c = new C
  Await.result(c.test(), Duration.Inf)
}

Problem

Nothing in the Scaladoc tells me that #12150

There ought to be at least minimal guidance. Perhaps Akka docs have a model.

The Scaladoc for Future should not say, "Don't use Future." In case that needed clarification.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions