QTest::ThrowOnFailEnabler Class | Qt Test | Qt 6.10.3

- Qt 6.10
- Qt Test
- C++ Classes
- QtTestLib
- ThrowOnFailEnabler
- Qt 6.10.3 Reference Documentation

# QTest::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)`.