Rosetta  2019.07
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
fmt::SystemError Class Reference

#include <format.h>

Inheritance diagram for fmt::SystemError:
Inheritance graph
[legend]

Public Member Functions

 SystemError (int error_code, CStringRef message)
 
FMT_API ~SystemError () FMT_DTOR_NOEXCEPT
 
int error_code () const
 

Protected Types

typedef char Char
 

Protected Member Functions

 SystemError ()
 
- Protected Member Functions inherited from fmt::internal::RuntimeError
 RuntimeError ()
 
 RuntimeError (const RuntimeError &rerr)
 
FMT_API ~RuntimeError () FMT_DTOR_NOEXCEPT
 

Protected Attributes

int error_code_
 

Private Member Functions

FMT_API void init (int err_code, CStringRef format_str, ArgList args)
 

Detailed Description

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

Member Typedef Documentation

Constructor & Destructor Documentation

fmt::SystemError::SystemError ( )
inlineprotected
fmt::SystemError::SystemError ( int  error_code,
CStringRef  message 
)
inline

Constructs a :class:fmt::SystemError 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 SystemError 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::SystemError(errno, "cannot open file '{}'", filename);

References basic::init().

FMT_FUNC fmt::SystemError::~SystemError ( )

Member Function Documentation

int fmt::SystemError::error_code ( ) const
inline
FMT_FUNC void fmt::SystemError::init ( int  err_code,
CStringRef  format_str,
ArgList  args 
)
private

Member Data Documentation

int fmt::SystemError::error_code_
protected

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