microsoft / durabletask-java

Java SDK for Durable Functions and the Durable Task Framework
MIT License
13 stars 7 forks source link

Change OrchestratorBlockedEvent and TaskFailedException to be unchecked exceptions #88

Closed cgillum closed 1 year ago

cgillum commented 1 year ago

To improve the ease of use for Durable Functions for Java, we should change OrchestratorBlockedEvent and TaskFailedException to both derive from the unchecked RuntimeException. The main drivers for this are:

  1. Users don't have to declare that every orchestrator functions throws OrchestratorBlockedEvent, TaskFailedException when using the new middleware.
  2. Users can more easily use context APIs from within lambdas.

We should also rename OrchestratorBlockedEvent to OrchestratorBlockedException now that it derives from Exception.