# DestroyAllSystemsAndLogException

> Destroy all system instances in the World. Any errors encountered during individual system destruction will be logged to the console.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Entities](/engine/7000.0/script-reference/unity/entities.md)
* **Assembly:** UnityEngine.EntitiesModule

## DestroyAllSystemsAndLogException()

Destroy all system instances in the World. Any errors encountered during individual system destruction will be logged to the console.

> **Warning:**
>
> **Deprecated.** This function now takes an out bool parameter to report if any exceptions were logged.

```csharp
public void DestroyAllSystemsAndLogException()
```

## DestroyAllSystemsAndLogException(bool)

Destroy all system instances in the World. Any errors encountered during individual system destruction will be logged to the console.

```csharp
public void DestroyAllSystemsAndLogException(out bool loggedException)
```

### Parameters

**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): If one or more exceptions were logged while destroying systems, this value will be set to true. This allows callers to detect whether any errors were encountered. If no exceptions were logged, this value will be set to false.
