[Pitch] Improved error handling in unstructured Task initializers

I guess this would still (silently) ignore the error?

func foo() {
    let task = Task {
      throw MyError.somethingBadHappened
    }
    print(task) // or task.cancel() after a small delay
}
1 Like