# IFatalErrorHandler Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.runtime.ifatalerrorhandler/)

## IsUnexpected(Exception) {#isunexpected-system-exception-308d8fbf}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.runtime.ifatalerrorhandler/methods/isunexpected-system-exception-308d8fbf/)

```csharp
public abstract bool IsUnexpected(Exception exception)
```

Determines whether the specified exception is unexpected.

### Parameters

- `exception` (`Exception`): The exception.

### Returns

`true` if the specified exception is unexpected; otherwise, `false`.

## OnFatalException(object, string, Exception) {#onfatalexception-object-string-system-exception-c56819d8}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.runtime.ifatalerrorhandler/methods/onfatalexception-object-string-system-exception-c56819d8/)

```csharp
public abstract void OnFatalException(object sender = null, string context = null, Exception exception = null)
```

Called when a fatal exception occurs.

### Parameters

- `sender` (`object`): The sender.
- `context` (`string`): The context.
- `exception` (`Exception`): The exception.
