# AssertionFailureException

Kind: Class · Namespace: Sansar.Script.Testing · Assembly: Sansar.Script.dll · Script API 47.10.0

<div class="api-meta">
<span class="api-kind api-kind-class" data-pagefind-filter="kind:Class">Class</span>
<span data-pagefind-filter="namespace:Sansar.Script.Testing">Namespace <a href="/scripting/api/sansar.script.testing"><code>Sansar.Script.Testing</code></a></span>
<span>Inherits <a href="https://learn.microsoft.com/dotnet/api/system.exception">Exception</a></span>
</div>
<p class="api-flag api-stripped-only">This type is documented in the client, but it is not in the reference assemblies that scripts compile against. Scripts may not be able to use it.</p>

<span id="T:Sansar.Script.Testing.AssertionFailureException"></span>

Thrown by [`Assertions`](/scripting/api/sansar.script.testing/assertions) tests.

```csharp
public class AssertionFailureException : Exception
```

## Members at a glance

| Kind | Members |
|---|---|
| **Properties** | [Message](#message) · [StackTrace](#stacktrace) |
| **Methods** | [ToString](#tostring) |

## Properties

### Message

<div class="api-card">
<span id="P:Sansar.Script.Testing.AssertionFailureException.Message"></span>

```csharp signature
public override string Message { get; }
```

The exception message

</div>

### StackTrace

<div class="api-card">
<span id="P:Sansar.Script.Testing.AssertionFailureException.StackTrace"></span>

```csharp signature
public override string StackTrace { get; }
```

The stack trace

</div>


## Methods

### ToString

<div class="api-card">
<span id="M:Sansar.Script.Testing.AssertionFailureException.ToString"></span>
<span id="M:Sansar.Script.Testing.AssertionFailureException.ToString()"></span>

```csharp signature
public override string ToString()
```

Short description of the exception.

**Returns:** [string](https://learn.microsoft.com/dotnet/api/system.string)

</div>




<p class="api-generated" data-pagefind-ignore>Generated from the Sansar 47.10.0 client ScriptApi snapshot.</p>