- Qt 6.8
- Qt Test
- C++ Classes
- QtTestLib
- ThrowOnFailEnabler
- Qt 6.8.1 Reference Documentation

# ThrowOnFailEnabler Class

class QTest::ThrowOnFailEnabler

Header: | `#include <ThrowOnFailEnabler>`
Since: | Qt 6.8

- List of all members, including inherited members

## Public Functions

| ThrowOnFailEnabler()
| ~ThrowOnFailEnabler()

## Detailed Description

RAII class around setThrowOnFail().

## Member Function Documentation

### ThrowOnFailEnabler::ThrowOnFailEnabler()

Constructor. Calls `setThrowOnFail(true)`.

### `[noexcept]` ThrowOnFailEnabler::~ThrowOnFailEnabler()

Destructor. Calls `setThrowOnFail(false)`.