    

 ## On this page

  

 

 # Class BadDataException

 Last update: 09.03.2026 

Namespace: [OpenTD](OpenTD.md)  
Assembly: OpenTD.dll

Thrown when OpenTD encounters bad input data.

```csharp
[Serializable]
public class BadDataException : OpenTDException, ISerializable, _Exception

```

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ← [Exception](https://learn.microsoft.com/dotnet/api/system.exception) ← [OpenTDException](OpenTD.OpenTDException.md) ← [BadDataException](OpenTD.BadDataException.md)

## Implements

[ISerializable](https://learn.microsoft.com/dotnet/api/system.runtime.serialization.iserializable), [\_Exception](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices._exception)

## Inherited Members

[OpenTDException.statusData](OpenTD.OpenTDException.md#OpenTD_OpenTDException_statusData), [OpenTDException.Show()](OpenTD.OpenTDException.md#OpenTD_OpenTDException_Show), [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), [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring), [object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)), [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)), [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone)

## Constructors

### BadDataException(string)

```csharp
public BadDataException(string msg)

```

#### Parameters

`msg` [string](https://learn.microsoft.com/dotnet/api/system.string)

## See Also

[Exception](https://learn.microsoft.com/dotnet/api/system.exception)