# FormattingException

> An exception caused while attempting to output the format.

## Definition

* **Type:** Class
* **Namespace:** [Unity.SmartStrings.Core.Formatting](/engine/6000.7/script-reference/unity/smartstrings/core/formatting.md)
* **Assembly:** UnityEngine.SmartStringsModule
* **Inherits from:** [Exception](https://learn.microsoft.com/dotnet/api/system.exception)
* **Implements:** [ISerializable](https://learn.microsoft.com/dotnet/api/system.runtime.serialization.iserializable)

```csharp
public class FormattingException : Exception, ISerializable
```

## Constructors

| Constructor                                                                                                                                                                                                                                     | Description                                                                                                                                 |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| [FormattingException(Unity.SmartStrings.Core.Parsing.FormatItem,System.Exception,System.Int32)](/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattingexception/ctor.md#formattingexception\(formatitem-exception-int\)) | Creates a new instance of [FormattingException](/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattingexception.md). |
| [FormattingException(Unity.SmartStrings.Core.Parsing.FormatItem,System.String,System.Int32)](/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattingexception/ctor.md#formattingexception\(formatitem-string-int\))       | Creates a new instance of [FormattingException](/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattingexception.md). |

## Properties

| Property                                                                                                         | Description                                                                                                                                          |
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| [ErrorItem](/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattingexception/erroritem.md) | The [FormatItem](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/formatitem.md) that caused the Exception.                           |
| [Format](/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattingexception/format.md)       | The base format string of the [FormatItem](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/formatitem.md) that caused the Exception. |
| [Index](/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattingexception/index.md)         | The index inside the format string, where the error occurred.                                                                                        |
| [Issue](/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattingexception/issue.md)         | Description of the formatting error.                                                                                                                 |
| [Message](/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattingexception/message.md)     | Error message that indicates the position within the format string where the error occurred.                                                         |

## Inheritance

**Inherited Members:**

* [Exception.GetBaseException()](https://learn.microsoft.com/dotnet/api/system.exception.getbaseexception)
* [Exception.GetObjectData(SerializationInfo, StreamingContext)](https://learn.microsoft.com/dotnet/api/system.exception.getobjectdata)
* [Exception.ToString()](https://learn.microsoft.com/dotnet/api/system.exception.tostring)
* [Exception.GetType()](https://learn.microsoft.com/dotnet/api/system.exception.gettype)
* [Exception.TargetSite()](https://learn.microsoft.com/dotnet/api/system.exception.targetsite)
* [Exception.Data()](https://learn.microsoft.com/dotnet/api/system.exception.data)
* [Exception.InnerException()](https://learn.microsoft.com/dotnet/api/system.exception.innerexception)
* [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.StackTrace()](https://learn.microsoft.com/dotnet/api/system.exception.stacktrace)
* [Exception.SerializeObjectState()](https://learn.microsoft.com/dotnet/api/system.exception.serializeobjectstate)
