MPD: system/Error.hxx File Reference

MPD 0.20.15

Functions
Error.hxx File Reference
`#include "util/StringUtil.hxx"`
`#include "Compiler.h"`
`#include <system_error>`
`#include <utility>`
`#include <stdio.h>`
`#include <errno.h>`
`#include <string.h>`
Include dependency graph for Error.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Functions
template<typename... Args>
static std::system_error | FormatSystemError (std::error_code code, const char *fmt, Args &&... args)
static const std::error_category & | ErrnoCategory ()
| Returns the error_category to be used to wrap errno values. More...
static std::system_error | MakeErrno (int code, const char *msg)
static std::system_error | MakeErrno (const char *msg)
template<typename... Args>
static std::system_error | FormatErrno (int code, const char *fmt, Args &&... args)
template<typename... Args>
static std::system_error | FormatErrno (const char *fmt, Args &&... args)
static gcc_pure bool | IsFileNotFound (const std::system_error &e) noexcept
static gcc_pure bool | IsPathNotFound (const std::system_error &e) noexcept
static gcc_pure bool | IsAccessDenied (const std::system_error &e) noexcept

## Function Documentation

## ◆ ErrnoCategory()

static const std::error_category& ErrnoCategory | ( |  | ) |
| inlinestatic

Returns the error_category to be used to wrap errno values.

The C++ standard does not define this well, so this code is based on observations what C++ standard library implementations actually use.

See also
  https://stackoverflow.com/questions/28746372/system-error-categories-and-standard-system-error-codes

Definition at line 107 of file Error.hxx.

## ◆ FormatErrno() [1/2]

template<typename... Args>

static std::system_error FormatErrno | ( | int | code,
|  | const char * | fmt,
|  | Args &&... | args
| ) |  |
| inlinestatic

Definition at line 135 of file Error.hxx.

## ◆ FormatErrno() [2/2]

template<typename... Args>

static std::system_error FormatErrno | ( | const char * | fmt,
|  | Args &&... | args
| ) |  |
| inlinestatic

Definition at line 145 of file Error.hxx.

## ◆ FormatSystemError()

template<typename... Args>

static std::system_error FormatSystemError | ( | std::error_code | code,
|  | const char * | fmt,
|  | Args &&... | args
| ) |  |
| inlinestatic

Definition at line 43 of file Error.hxx.

## ◆ IsAccessDenied()

static gcc_pure bool IsAccessDenied | ( | const std::system_error & | e | ) |
| inlinestaticnoexcept

Definition at line 178 of file Error.hxx.

## ◆ IsFileNotFound()

static gcc_pure bool IsFileNotFound | ( | const std::system_error & | e | ) |
| inlinestaticnoexcept

Definition at line 152 of file Error.hxx.

## ◆ IsPathNotFound()

static gcc_pure bool IsPathNotFound | ( | const std::system_error & | e | ) |
| inlinestaticnoexcept

Definition at line 165 of file Error.hxx.

## ◆ MakeErrno() [1/2]

static std::system_error MakeErrno | ( | int | code,
|  | const char * | msg
| ) |  |
| inlinestatic

Definition at line 121 of file Error.hxx.

## ◆ MakeErrno() [2/2]

static std::system_error MakeErrno | ( | const char * | msg | ) |
| inlinestatic

Definition at line 128 of file Error.hxx.