Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
system_error Class Reference

#include <format.h>

Inheritance diagram for system_error:
Inheritance graph
[legend]

Public Member Functions

int error_code () const
 
system_erroroperator= (const system_error &)=default
 
system_erroroperator= (system_error &&)=default
 
template<typename... Args>
 system_error (int error_code, string_view message, const Args &... args)
 
 system_error (const system_error &)=default
 
 system_error (system_error &&)=default
 
 ~system_error () FMT_NOEXCEPT FMT_OVERRIDE
 

Protected Member Functions

 system_error ()
 

Protected Attributes

int error_code_
 

Private Member Functions

void init (int err_code, string_view format_str, format_args args)
 

Detailed Description

An error returned by an operating system or a language runtime, for example a file opening error.

Definition at line 3255 of file format.h.

Constructor & Destructor Documentation

◆ system_error() [1/4]

system_error::system_error ( )
inlineprotected

Definition at line 3262 of file format.h.

◆ system_error() [2/4]

template<typename... Args>
system_error::system_error ( int  error_code,
string_view  message,
const Args &...  args 
)
inline

Constructs a :class:fmt::system_error object with a description formatted with fmt::format_system_error. message and additional arguments passed into the constructor are formatted similarly to fmt::format.

Example**::

This throws a system_error with the description cannot open file 'madeup': No such file or directory or similar (system message may vary). const char *filename = "madeup"; std::FILE *file = std::fopen(filename, "r"); if (!file) throw fmt::system_error(errno, "cannot open file '{}'", filename);

Definition at line 3284 of file format.h.

◆ system_error() [3/4]

system_error::system_error ( const system_error )
default

◆ system_error() [4/4]

system_error::system_error ( system_error &&  )
default

◆ ~system_error()

FMT_API FMT_FUNC system_error::~system_error ( )
default

Member Function Documentation

◆ error_code()

int system_error::error_code ( ) const
inline

Definition at line 3294 of file format.h.

◆ init()

FMT_FUNC void system_error::init ( int  err_code,
string_view  format_str,
format_args  args 
)
private

Definition at line 211 of file format-inl.h.

◆ operator=() [1/2]

system_error& system_error::operator= ( const system_error )
default

◆ operator=() [2/2]

system_error& system_error::operator= ( system_error &&  )
default

Member Data Documentation

◆ error_code_

int system_error::error_code_
protected

Definition at line 3260 of file format.h.


The documentation for this class was generated from the following files:


plotjuggler_ros
Author(s): Davide Faconti
autogenerated on Fri Jun 23 2023 02:28:04