# OrleansGeneratedCodeHelper.ThrowUnknownUnionCase(uint)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.generatedcodehelpers.orleansgeneratedcodehelper/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.generatedcodehelpers.orleansgeneratedcodehelper/methods/)

[Source](https://github.com/dotnet/orleans/blob/4e887e9c914a2f2647fb3c81de963511521dd9cb/src/Orleans.Serialization/GeneratedCodeHelpers/OrleansGeneratedCodeHelper.cs#L318)

```csharp
public static TField ThrowUnknownUnionCase<TField>(uint caseId)
```

Throws an exception indicating that a serialized tagged-union value has an unknown case identifier.

### Parameters

- `caseId` (`uint`): The case identifier which was read.

### Returns

This method does not return.
