---
name: "std::future_error"
section: "3cxx"
platform: "linux"
package: "libstdc++-12-doc"
version: "12.4.0-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/std::future_error/3cxx"
---

# std::future\_error(3cxx)

Exception type thrown by futures.

## NAME

std::future\_error - Exception type thrown by futures.

## SYNOPSIS

`#include <future>`

Inherits **std::logic\_error**.

### Public Member Functions

**future\_error** (**future\_errc** **\_\_errc**)\
 const **error\_code** & **code** () const noexcept\
 **virtual** const char \* **what** () const noexcept\

### Friends

**void** **\_\_throw\_future\_error** (int)\

## Detailed Description

Exception type thrown by futures.

**Since**

C++11

## Member Function Documentation

### virtual const char \* std::future\_error::what () const` [virtual]`, ` [noexcept]`

Returns a C-style character string describing the general cause of the current error (the same string passed to the ctor). \

Reimplemented from **std::logic\_error**.

## Author

Generated automatically by Doxygen for libstdc++ from the source code.
