# AssertionException

> An exception that is thrown when an assertion fails.

## Definition

* **Type:** Class
* **Namespace:** [UnityEngine.Assertions](/engine/6000.0/script-reference/unityengine/assertions.md)
* **Assembly:** UnityEngine.CoreModule
* **Inherits from:** [Exception](https://learn.microsoft.com/dotnet/api/system.exception)
* **Implements:** [ISerializable](https://learn.microsoft.com/dotnet/api/system.runtime.serialization.iserializable), [\_Exception](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices._exception)

```csharp
public class AssertionException : Exception, ISerializable, _Exception
```

## Inheritance

**Inherited Members:**

* [Exception.GetBaseException()](https://learn.microsoft.com/dotnet/api/system.exception.getbaseexception)
* [Exception.ToString()](https://learn.microsoft.com/dotnet/api/system.exception.tostring)
* [Exception.GetObjectData(SerializationInfo, StreamingContext)](https://learn.microsoft.com/dotnet/api/system.exception.getobjectdata)
* [Exception.GetType()](https://learn.microsoft.com/dotnet/api/system.exception.gettype)
* [Exception.Message()](https://learn.microsoft.com/dotnet/api/system.exception.message)
* [Exception.Data()](https://learn.microsoft.com/dotnet/api/system.exception.data)
* [Exception.InnerException()](https://learn.microsoft.com/dotnet/api/system.exception.innerexception)
* [Exception.TargetSite()](https://learn.microsoft.com/dotnet/api/system.exception.targetsite)
* [Exception.StackTrace()](https://learn.microsoft.com/dotnet/api/system.exception.stacktrace)
* [Exception.HelpLink()](https://learn.microsoft.com/dotnet/api/system.exception.helplink)
* [Exception.Source()](https://learn.microsoft.com/dotnet/api/system.exception.source)
* [Exception.HResult()](https://learn.microsoft.com/dotnet/api/system.exception.hresult)
* [Exception.SerializeObjectState()](https://learn.microsoft.com/dotnet/api/system.exception.serializeobjectstate)
