Class MutationException
Base exception type for errors occurring during a mutation execution.
Inheritance
MutationException
Implements
Inherited Members
Namespace: ModularityKit.Mutator.Abstractions.Exceptions
Assembly: ModularityKit.Mutator.dll
Syntax
public class MutationException : Exception, ISerializable
Remarks
MutationException is thrown whenever a mutation fails due to internal errors, policy violations, or unexpected state inconsistencies. It carries an optional ExecutionId to correlate the exception with a specific mutation run.
Common usage scenarios include:
- Mutation execution failures inside a
Mutator. - Interception or auditing errors during mutation lifecycle.
- Unexpected state validation or integrity violations.
Constructors
| Edit this page View SourceMutationException(string)
Initializes a new instance of MutationException with a specified message.
Declaration
public MutationException(string message)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | Human-readable description of the error. |
MutationException(string, Exception)
Initializes a new instance of MutationException with a specified message and an inner exception that caused this error.
Declaration
public MutationException(string message, Exception innerException)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | Human-readable description of the error. |
| Exception | innerException | The underlying exception that triggered this error. |
Properties
| Edit this page View SourceExecutionId
Optional unique identifier of the mutation execution that caused the exception.
Declaration
public string? ExecutionId { get; init; }
Property Value
| Type | Description |
|---|---|
| string |