Safe Haskell | None |
---|---|
Language | Haskell2010 |
Temporal.Exception
Synopsis
- mkAnnotatedHandlers :: [ApplicationFailureHandler] -> [ApplicationFailureHandler]
- prettySrcLoc :: SrcLoc -> String
- prettyCallStack :: CallStack -> String
- prettyCallStackLines :: CallStack -> [String]
- data ActivityCancelReason
- data ActivityFailure = ActivityFailure {}
- data ApplicationFailure = ApplicationFailure {}
- data WorkflowExecutionFailedAttributes = WorkflowExecutionFailedAttributes {}
- data CompleteAsync = CompleteAsync
- data ApplicationFailureHandler where
- ApplicationFailureHandler :: forall e. Exception e => (e -> ApplicationFailure) -> ApplicationFailureHandler
- data SomeWorkerException = Exception e => SomeWorkerException e
- workerExceptionToException :: Exception e => e -> SomeException
- workerExceptionFromException :: Exception e => SomeException -> Maybe e
- data RuntimeError = RuntimeError String
- data WorkflowNotFound = WorkflowNotFound String
- data ActivityNotFound = ActivityNotFound String
- data QueryNotFound = QueryNotFound String
- data LogicBugType
- data LogicBug = LogicBug LogicBugType
- data WorkflowAlreadyStarted = WorkflowAlreadyStarted {}
- data ChildWorkflowFailed = ChildWorkflowFailed Failure
- data ChildWorkflowCancelled = ChildWorkflowCancelled
- data SignalExternalWorkflowFailed = SignalExternalWorkflowFailed Failure
- data ContinueAsNewException = ContinueAsNewException {}
- data AlternativeInstanceFailure = AlternativeInstanceFailure
- data CancelExternalWorkflowFailed = CancelExternalWorkflowFailed Failure
- data WorkflowCancelRequested = WorkflowCancelRequested
- data ActivityCancelled = ActivityCancelled Failure
- applicationFailureToFailureProto :: ApplicationFailure -> Failure
- class ToApplicationFailure e where
- data SomeApplicationFailure = (Exception e, ToApplicationFailure e) => SomeApplicationFailure e
- applicationFailureToException :: (Exception e, ToApplicationFailure e) => e -> SomeException
- applicationFailureFromException :: Exception e => SomeException -> Maybe e
- mkApplicationFailure :: SomeException -> [ApplicationFailureHandler] -> ApplicationFailure
- basicHandler :: Exception e => e -> ApplicationFailure
- annToPayload :: Annotation -> Payload
- annotationHandler :: Exception e => (e -> ApplicationFailure) -> AnnotatedException e -> ApplicationFailure
- data NonRetryableError = NonRetryableError Bool
- data NextRetryDelay = NextRetryDelay (Maybe Duration)
- standardApplicationFailureHandlers :: [ApplicationFailureHandler]
- annotateNonRetryableError :: Annotation
- annotateRetryableError :: Annotation
- annotateNextRetryDelay :: Duration -> Annotation
- annotateNoRetryDelay :: Annotation
- data SomeActivityException = Exception e => SomeActivityException e
- activityExceptionToException :: Exception e => e -> SomeException
- activityExceptionFromException :: Exception e => SomeException -> Maybe e
- data WorkflowExecutionClosed
- newtype ActivityType = ActivityType {}
- data RetryState
Documentation
prettySrcLoc :: SrcLoc -> String Source #
prettyCallStackLines :: CallStack -> [String] Source #
data ActivityCancelReason Source #
A type of exception thrown to a running activity to cancel it due to things happening
with the worker, such as a shutdown. This differs from a normal activity cancellation, which
uses the cancel
function from the async
package.
Constructors
NotFound | The activity no longer exists on the server (may already be completed or its workflow may be completed). |
CancelRequested | The activity was explicitly cancelled. |
Timeout | Activity timeout caused the activity to be marked cancelled. |
WorkerShutdown | The worker the activity is running on is shutting down. |
UnknownCancellationReason | We received a cancellation reason that we don't know how to handle. |
Instances
Exception ActivityCancelReason Source # | |
Defined in Temporal.Exception | |
Show ActivityCancelReason Source # | |
Defined in Temporal.Exception Methods showsPrec :: Int -> ActivityCancelReason -> ShowS # show :: ActivityCancelReason -> String # showList :: [ActivityCancelReason] -> ShowS # |
data ActivityFailure Source #
Constructors
ActivityFailure | |
Fields
|
Instances
Exception ActivityFailure Source # | |
Defined in Temporal.Exception Methods toException :: ActivityFailure -> SomeException # fromException :: SomeException -> Maybe ActivityFailure # displayException :: ActivityFailure -> String # backtraceDesired :: ActivityFailure -> Bool # | |
Show ActivityFailure Source # | |
Defined in Temporal.Exception Methods showsPrec :: Int -> ActivityFailure -> ShowS # show :: ActivityFailure -> String # showList :: [ActivityFailure] -> ShowS # | |
Eq ActivityFailure Source # | |
Defined in Temporal.Exception Methods (==) :: ActivityFailure -> ActivityFailure -> Bool # (/=) :: ActivityFailure -> ActivityFailure -> Bool # |
data ApplicationFailure Source #
Constructors
ApplicationFailure | |
Instances
Exception ApplicationFailure Source # | |
Defined in Temporal.Exception Methods toException :: ApplicationFailure -> SomeException # fromException :: SomeException -> Maybe ApplicationFailure # | |
Show ApplicationFailure Source # | |
Defined in Temporal.Exception Methods showsPrec :: Int -> ApplicationFailure -> ShowS # show :: ApplicationFailure -> String # showList :: [ApplicationFailure] -> ShowS # | |
Eq ApplicationFailure Source # | |
Defined in Temporal.Exception Methods (==) :: ApplicationFailure -> ApplicationFailure -> Bool # (/=) :: ApplicationFailure -> ApplicationFailure -> Bool # |
data WorkflowExecutionFailedAttributes Source #
Constructors
WorkflowExecutionFailedAttributes | |
Fields |
Instances
Show WorkflowExecutionFailedAttributes Source # | |
Defined in Temporal.Exception Methods showsPrec :: Int -> WorkflowExecutionFailedAttributes -> ShowS # | |
Eq WorkflowExecutionFailedAttributes Source # | |
Defined in Temporal.Exception |
data CompleteAsync Source #
Asynchronous Activity Completion is a feature that enables an Activity Function to return without causing the Activity Execution to complete. The Temporal Client can then be used to both Heartbeat Activity Execution progress and eventually provide a result.
The intended use-case for this feature is when an external system has the final result of a computation, started by an Activity.
Consider using Asynchronous Activities instead of Signals if the external process is unreliable and might fail to send critical status updates through a Signal.
Consider using Signals as an alternative to Asynchronous Activities to return data back to a Workflow Execution if there is a human in the process loop. The reason is that a human in the loop means multiple steps in the process. The first is the Activity Function that stores state in an external system and at least one other step where a human would “complete” the activity. If the first step fails, you want to detect that quickly and retry instead of waiting for the entire process, which could be significantly longer when humans are involved.
Constructors
CompleteAsync |
Instances
Exception CompleteAsync Source # | |
Defined in Temporal.Exception Methods toException :: CompleteAsync -> SomeException # fromException :: SomeException -> Maybe CompleteAsync # displayException :: CompleteAsync -> String # backtraceDesired :: CompleteAsync -> Bool # | |
Show CompleteAsync Source # | |
Defined in Temporal.Exception Methods showsPrec :: Int -> CompleteAsync -> ShowS # show :: CompleteAsync -> String # showList :: [CompleteAsync] -> ShowS # |
data ApplicationFailureHandler where Source #
Constructors
ApplicationFailureHandler :: forall e. Exception e => (e -> ApplicationFailure) -> ApplicationFailureHandler |
data SomeWorkerException Source #
Constructors
Exception e => SomeWorkerException e |
Instances
Exception SomeWorkerException Source # | |
Defined in Temporal.Exception | |
Show SomeWorkerException Source # | |
Defined in Temporal.Exception Methods showsPrec :: Int -> SomeWorkerException -> ShowS # show :: SomeWorkerException -> String # showList :: [SomeWorkerException] -> ShowS # |
workerExceptionToException :: Exception e => e -> SomeException Source #
workerExceptionFromException :: Exception e => SomeException -> Maybe e Source #
data RuntimeError Source #
Errors that are an issue with the worker itself, not the workflow
These errors should cause the worker to exit, and imply an issue with the SDK itself.
Constructors
RuntimeError String |
Instances
Exception RuntimeError Source # | |
Defined in Temporal.Exception Methods toException :: RuntimeError -> SomeException # fromException :: SomeException -> Maybe RuntimeError # displayException :: RuntimeError -> String # backtraceDesired :: RuntimeError -> Bool # | |
Show RuntimeError Source # | |
Defined in Temporal.Exception Methods showsPrec :: Int -> RuntimeError -> ShowS # show :: RuntimeError -> String # showList :: [RuntimeError] -> ShowS # |
data WorkflowNotFound Source #
Errors that are the fault of the developer, not the SDK.
Constructors
WorkflowNotFound String |
Instances
Exception WorkflowNotFound Source # | |
Defined in Temporal.Exception Methods toException :: WorkflowNotFound -> SomeException # fromException :: SomeException -> Maybe WorkflowNotFound # | |
Show WorkflowNotFound Source # | |
Defined in Temporal.Exception Methods showsPrec :: Int -> WorkflowNotFound -> ShowS # show :: WorkflowNotFound -> String # showList :: [WorkflowNotFound] -> ShowS # |
data ActivityNotFound Source #
Constructors
ActivityNotFound String |
Instances
Exception ActivityNotFound Source # | |
Defined in Temporal.Exception Methods toException :: ActivityNotFound -> SomeException # fromException :: SomeException -> Maybe ActivityNotFound # | |
Show ActivityNotFound Source # | |
Defined in Temporal.Exception Methods showsPrec :: Int -> ActivityNotFound -> ShowS # show :: ActivityNotFound -> String # showList :: [ActivityNotFound] -> ShowS # |
data QueryNotFound Source #
Constructors
QueryNotFound String |
Instances
Exception QueryNotFound Source # | |
Defined in Temporal.Exception Methods toException :: QueryNotFound -> SomeException # fromException :: SomeException -> Maybe QueryNotFound # displayException :: QueryNotFound -> String # backtraceDesired :: QueryNotFound -> Bool # | |
Show QueryNotFound Source # | |
Defined in Temporal.Exception Methods showsPrec :: Int -> QueryNotFound -> ShowS # show :: QueryNotFound -> String # showList :: [QueryNotFound] -> ShowS # |
data LogicBugType Source #
Instances
Show LogicBugType Source # | |
Defined in Temporal.Exception Methods showsPrec :: Int -> LogicBugType -> ShowS # show :: LogicBugType -> String # showList :: [LogicBugType] -> ShowS # |
Constructors
LogicBug LogicBugType |
Instances
Exception LogicBug Source # | |
Defined in Temporal.Exception Methods toException :: LogicBug -> SomeException # fromException :: SomeException -> Maybe LogicBug # displayException :: LogicBug -> String # backtraceDesired :: LogicBug -> Bool # | |
Show LogicBug Source # | |
data WorkflowAlreadyStarted Source #
Constructors
WorkflowAlreadyStarted | |
Instances
Exception WorkflowAlreadyStarted Source # | |
Defined in Temporal.Exception | |
Show WorkflowAlreadyStarted Source # | |
Defined in Temporal.Exception Methods showsPrec :: Int -> WorkflowAlreadyStarted -> ShowS # show :: WorkflowAlreadyStarted -> String # showList :: [WorkflowAlreadyStarted] -> ShowS # |
data ChildWorkflowFailed Source #
Constructors
ChildWorkflowFailed Failure |
Instances
Exception ChildWorkflowFailed Source # | |
Defined in Temporal.Exception | |
Show ChildWorkflowFailed Source # | |
Defined in Temporal.Exception Methods showsPrec :: Int -> ChildWorkflowFailed -> ShowS # show :: ChildWorkflowFailed -> String # showList :: [ChildWorkflowFailed] -> ShowS # |
data ChildWorkflowCancelled Source #
Constructors
ChildWorkflowCancelled |
Instances
Exception ChildWorkflowCancelled Source # | |
Defined in Temporal.Exception | |
Show ChildWorkflowCancelled Source # | |
Defined in Temporal.Exception Methods showsPrec :: Int -> ChildWorkflowCancelled -> ShowS # show :: ChildWorkflowCancelled -> String # showList :: [ChildWorkflowCancelled] -> ShowS # | |
Eq ChildWorkflowCancelled Source # | |
Defined in Temporal.Exception Methods (==) :: ChildWorkflowCancelled -> ChildWorkflowCancelled -> Bool # (/=) :: ChildWorkflowCancelled -> ChildWorkflowCancelled -> Bool # |
data SignalExternalWorkflowFailed Source #
Constructors
SignalExternalWorkflowFailed Failure |
Instances
Exception SignalExternalWorkflowFailed Source # | |
Show SignalExternalWorkflowFailed Source # | |
Defined in Temporal.Exception Methods showsPrec :: Int -> SignalExternalWorkflowFailed -> ShowS # show :: SignalExternalWorkflowFailed -> String # showList :: [SignalExternalWorkflowFailed] -> ShowS # |
data ContinueAsNewException Source #
Constructors
ContinueAsNewException | |
Instances
Exception ContinueAsNewException Source # | |
Defined in Temporal.Exception | |
Show ContinueAsNewException Source # | |
Defined in Temporal.Exception Methods showsPrec :: Int -> ContinueAsNewException -> ShowS # show :: ContinueAsNewException -> String # showList :: [ContinueAsNewException] -> ShowS # |
data AlternativeInstanceFailure Source #
Constructors
AlternativeInstanceFailure |
Instances
Exception AlternativeInstanceFailure Source # | |
Defined in Temporal.Exception | |
Show AlternativeInstanceFailure Source # | |
Defined in Temporal.Exception Methods showsPrec :: Int -> AlternativeInstanceFailure -> ShowS # show :: AlternativeInstanceFailure -> String # showList :: [AlternativeInstanceFailure] -> ShowS # |
data CancelExternalWorkflowFailed Source #
Constructors
CancelExternalWorkflowFailed Failure |
Instances
Exception CancelExternalWorkflowFailed Source # | |
Show CancelExternalWorkflowFailed Source # | |
Defined in Temporal.Exception Methods showsPrec :: Int -> CancelExternalWorkflowFailed -> ShowS # show :: CancelExternalWorkflowFailed -> String # showList :: [CancelExternalWorkflowFailed] -> ShowS # |
data WorkflowCancelRequested Source #
Constructors
WorkflowCancelRequested |
Instances
Exception WorkflowCancelRequested Source # | |
Defined in Temporal.Exception | |
Show WorkflowCancelRequested Source # | |
Defined in Temporal.Exception Methods showsPrec :: Int -> WorkflowCancelRequested -> ShowS # show :: WorkflowCancelRequested -> String # showList :: [WorkflowCancelRequested] -> ShowS # |
data ActivityCancelled Source #
Constructors
ActivityCancelled Failure |
Instances
Exception ActivityCancelled Source # | |
Defined in Temporal.Exception Methods toException :: ActivityCancelled -> SomeException # fromException :: SomeException -> Maybe ActivityCancelled # | |
Show ActivityCancelled Source # | |
Defined in Temporal.Exception Methods showsPrec :: Int -> ActivityCancelled -> ShowS # show :: ActivityCancelled -> String # showList :: [ActivityCancelled] -> ShowS # | |
Eq ActivityCancelled Source # | |
Defined in Temporal.Exception Methods (==) :: ActivityCancelled -> ActivityCancelled -> Bool # (/=) :: ActivityCancelled -> ActivityCancelled -> Bool # |
class ToApplicationFailure e where Source #
Methods
data SomeApplicationFailure Source #
Constructors
(Exception e, ToApplicationFailure e) => SomeApplicationFailure e |
Instances
Exception SomeApplicationFailure Source # | |
Defined in Temporal.Exception | |
Show SomeApplicationFailure Source # | |
Defined in Temporal.Exception Methods showsPrec :: Int -> SomeApplicationFailure -> ShowS # show :: SomeApplicationFailure -> String # showList :: [SomeApplicationFailure] -> ShowS # |
applicationFailureToException :: (Exception e, ToApplicationFailure e) => e -> SomeException Source #
applicationFailureFromException :: Exception e => SomeException -> Maybe e Source #
basicHandler :: Exception e => e -> ApplicationFailure Source #
annToPayload :: Annotation -> Payload Source #
annotationHandler :: Exception e => (e -> ApplicationFailure) -> AnnotatedException e -> ApplicationFailure Source #
data NonRetryableError Source #
Constructors
NonRetryableError Bool |
Instances
Show NonRetryableError Source # | |
Defined in Temporal.Exception Methods showsPrec :: Int -> NonRetryableError -> ShowS # show :: NonRetryableError -> String # showList :: [NonRetryableError] -> ShowS # | |
Eq NonRetryableError Source # | |
Defined in Temporal.Exception Methods (==) :: NonRetryableError -> NonRetryableError -> Bool # (/=) :: NonRetryableError -> NonRetryableError -> Bool # |
data NextRetryDelay Source #
Constructors
NextRetryDelay (Maybe Duration) |
Instances
Show NextRetryDelay Source # | |
Defined in Temporal.Exception Methods showsPrec :: Int -> NextRetryDelay -> ShowS # show :: NextRetryDelay -> String # showList :: [NextRetryDelay] -> ShowS # | |
Eq NextRetryDelay Source # | |
Defined in Temporal.Exception Methods (==) :: NextRetryDelay -> NextRetryDelay -> Bool # (/=) :: NextRetryDelay -> NextRetryDelay -> Bool # |
data SomeActivityException Source #
Constructors
Exception e => SomeActivityException e |
Instances
Exception SomeActivityException Source # | |
Defined in Temporal.Exception | |
Show SomeActivityException Source # | |
Defined in Temporal.Exception Methods showsPrec :: Int -> SomeActivityException -> ShowS # show :: SomeActivityException -> String # showList :: [SomeActivityException] -> ShowS # |
activityExceptionToException :: Exception e => e -> SomeException Source #
activityExceptionFromException :: Exception e => SomeException -> Maybe e Source #
data WorkflowExecutionClosed Source #
Constructors
WorkflowExecutionFailed WorkflowExecutionFailedEventAttributes | |
WorkflowExecutionTimedOut | |
WorkflowExecutionCanceled | |
WorkflowExecutionTerminated | |
WorkflowExecutionContinuedAsNew |
Instances
Exception WorkflowExecutionClosed Source # | |
Defined in Temporal.Exception | |
Show WorkflowExecutionClosed Source # | |
Defined in Temporal.Exception Methods showsPrec :: Int -> WorkflowExecutionClosed -> ShowS # show :: WorkflowExecutionClosed -> String # showList :: [WorkflowExecutionClosed] -> ShowS # | |
Eq WorkflowExecutionClosed Source # | |
Defined in Temporal.Exception Methods (==) :: WorkflowExecutionClosed -> WorkflowExecutionClosed -> Bool # (/=) :: WorkflowExecutionClosed -> WorkflowExecutionClosed -> Bool # |
newtype ActivityType Source #
Constructors
ActivityType | |
Fields |
Instances
data RetryState Source #
Constructors
Instances
Show RetryState Source # | |
Defined in Temporal.Common Methods showsPrec :: Int -> RetryState -> ShowS # show :: RetryState -> String # showList :: [RetryState] -> ShowS # | |
Eq RetryState Source # | |
Defined in Temporal.Common |