# SummarizeErrors()

> Returns a string summarizing any errors that occurred during the build

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.Build.Reporting](/engine/6000.5/script-reference/unityeditor/build/reporting.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public string SummarizeErrors()
```

### Returns

| Type                                                           | Description |
| -------------------------------------------------------------- | ----------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) |             |

### Remarks

Convenience method for summarizing errors (or exceptions) that occurred during a build into a single line of text. If no error was logged this returns an empty string.  If a single error was logged this reports the error messages.  Otherwise it reports the number of errors, for example "5 errors".

Note: To examine all errors, warnings and other messages recorded during a build you can enumerating through the build [\_steps](/engine/6000.5/script-reference/unityeditor/build/reporting/buildreport/steps.md) and check [\_messages](/engine/6000.5/script-reference/unityeditor/build/reporting/buildstep/messages.md). And to retrieve the count of errors call [\_totalErrors](/engine/6000.5/script-reference/unityeditor/build/reporting/buildsummary/totalerrors.md).
