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

# 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. This is the default option if a debugger is not present. |
| OutputDebugStringOnError | On error, output debug messages. 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](https://docs.xbox.com/reference/system/xerror/functions/xerrorsetoptions.md) 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](https://docs.xbox.com/reference/system/xerror/xerror_members.md)\
[XErrorSetOptions](https://docs.xbox.com/reference/system/xerror/functions/xerrorsetoptions.md)


## Related topics

- [XErrorSetOptions](https://docs.xbox.com/reference/system/xerror/functions/xerrorsetoptions.md)
- [XError members (API contents)](https://docs.xbox.com/reference/system/xerror/xerror_members.md)
- [DSTORAGE_QUEUE_OPTIONS](https://docs.xbox.com/reference/system/dstorage/structs/dstorage_queue_options.md)
- [XErrorCallback](https://docs.xbox.com/reference/system/xerror/functions/xerrorcallback.md)
- [Error codes](https://docs.xbox.com/reference/errorcodes.md)
