Class TemporalException
- Namespace
- Temporalio.Exceptions
- Assembly
- Temporalio.dll
Base exception for all custom exceptions thrown by the Temporal library.
public abstract class TemporalException : Exception, ISerializable
- Inheritance
-
TemporalException
- Implements
- Derived
- Inherited Members
Constructors
TemporalException()
Initializes a new instance of the TemporalException class.
protected TemporalException()
TemporalException(string)
Initializes a new instance of the TemporalException class.
protected TemporalException(string message)
Parameters
message
stringMessage for the exception.
TemporalException(string, Exception?)
Initializes a new instance of the TemporalException class.
protected TemporalException(string message, Exception? inner)
Parameters
Methods
IsCanceledException(Exception)
Whether the given exception is a .NET cancellation or a Temporal cancellation (including a cancellation inside an activity or child exception).
public static bool IsCanceledException(Exception e)
Parameters
e
ExceptionException to check.
Returns
- bool
True if the exception is due to a cancellation.
Remarks
This is useful to determine whether a client/in-workflow caught exception is due to cancellation. Temporal wraps exceptions or reuses .NET cancellation exceptions, so a simple type check is not enough to be sure.