> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XErrorOptions

> XErrorOptions

# XErrorOptions

Describes how the game should behave when an error occurs in the gaming OS or gaming runtime.

## Syntax

```cpp theme={null}
enum class XErrorOptions  : uint32_t  
{  
    None = 0x00,  
    OutputDebugStringOnError = 0x01,  
    DebugBreakOnError = 0x02,  
    FailFastOnError = 0x04,  
}  
```

## Constants

| Constant                 | Description                                                                                                                                     |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| None                     | On error, do nothing.<br />This is the default option if a debugger is not present.                                                             |
| OutputDebugStringOnError | On error, output debug messages.<br />This is the default option if a debugger is present.                                                      |
| DebugBreakOnError        | On error, break into the debugger and output debug messages.                                                                                    |
| FailFastOnError          | On error, request a [fast fail](https://learn.microsoft.com/cpp/intrinsics/fastfail?view=vs-2019) to immediately terminate the calling process. |

## Remarks

**XErrorOptions** is used by the [XErrorSetOptions](/reference/system/xerror/functions/xerrorsetoptions) function to describe how the game should behave when an error occurs, depending on whether a debugger is present. If `OutputDebugStringOnError` or `DebugBreakOnError` is specified and a debugger is present, a debug string containing the HRESULT error code, current thread ID, and error message is sent to the debugger for display. If `DebugBreakOnError` is specified, the game breaks into the debugger.

## Requirements

**Header:** XError.h

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## See also

[XError members](/reference/system/xerror/xerror_members)\
[XErrorSetOptions](/reference/system/xerror/functions/xerrorsetoptions)


## Related topics

- [XErrorSetOptions](/reference/system/xerror/functions/xerrorsetoptions.md)
- [XError members](/reference/system/xerror/xerror_members.md)
- [Error codes](/reference/errorcodes.md)
- [XErrorCallback](/reference/system/xerror/functions/xerrorcallback.md)
- [DSTORAGE_QUEUE_OPTIONS](/reference/system/dstorage/structs/dstorage_queue_options.md)
