Class TweenException
Exception thrown when a tween operation encounters an unrecoverable error.
Implements
Inherited Members
Namespace: Scylla.Core.Util.Tween
Assembly: ScyllaCore.dll
Syntax
public class TweenException : Exception, ISerializable
Remarks
TweenException extends Exception with two additional
diagnostic properties: the TweenID of the offending tween (when
known) and a structured TweenErrorCode that callers can switch on to
decide how to handle the failure without string parsing.
When no tween ID is available - for example during pool exhaustion or when a configuration method is called before a tween has been associated - TweenID is set to None and ErrorCode is set to Unknown.
Note that callback exceptions are intentionally caught and logged by
TweenBase rather than propagated as TweenException. A
TweenException therefore represents a systemic tween-system failure, not a
user-callback failure.
Constructors
TweenException(string)
Initializes a new TweenException with the specified human-readable message. The TweenID is set to None and ErrorCode is set to Unknown.
Declaration
public TweenException(string message)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | A human-readable description of the error. This becomes the Message property. |
TweenException(string, TweenErrorCode)
Initializes a new TweenException with the specified message and a structured error code. The TweenID is set to None.
Declaration
public TweenException(string message, TweenErrorCode errorCode)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | A human-readable description of the error. |
| TweenErrorCode | errorCode | The TweenErrorCode that categorises the failure, enabling callers to react programmatically without parsing the message string. |
TweenException(string, TweenErrorCode, Exception)
Initializes a new TweenException with a structured error code that wraps an inner exception. The TweenID is set to None.
Declaration
public TweenException(string message, TweenErrorCode errorCode, Exception innerException)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | A human-readable description of the error. |
| TweenErrorCode | errorCode | The TweenErrorCode that categorises the failure. |
| Exception | innerException | The exception that is the underlying cause of this exception, or |
TweenException(string, TweenID, TweenErrorCode)
Initializes a new TweenException with the specified message, the TweenID of the offending tween, and a structured error code.
Declaration
public TweenException(string message, TweenID tweenID, TweenErrorCode errorCode)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | A human-readable description of the error. |
| TweenID | tweenID | The TweenID of the tween that caused the error. Pass None when no tween ID is available. |
| TweenErrorCode | errorCode | The TweenErrorCode that categorises the failure. |
TweenException(string, Exception)
Initializes a new TweenException that wraps an inner exception. The TweenID is set to None and ErrorCode is set to Unknown.
Declaration
public TweenException(string message, Exception innerException)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | A human-readable description of the error. |
| Exception | innerException | The exception that is the underlying cause of this exception, or |
Properties
ErrorCode
Gets the structured error code that categorises the nature of the failure.
Declaration
public TweenErrorCode ErrorCode { get; }
Property Value
| Type | Description |
|---|---|
| TweenErrorCode | One of the TweenErrorCode values. Defaults to Unknown when an error code is not explicitly provided at the throw site. |
See Also
TweenID
Gets the TweenID of the tween that triggered this exception, or None when no specific tween can be identified.
Declaration
public TweenID TweenID { get; }
Property Value
| Type | Description |
|---|---|
| TweenID | Populated only when the throwing code has access to the offending tween instance. Use IsValid to determine whether the value is meaningful. |