NGL  6.5
The NCCA Graphics Library
fmt::SystemError Class Reference

#include <format.h>

+ Inheritance diagram for fmt::SystemError:
+ Collaboration diagram for fmt::SystemError:

Public Member Functions

 SystemError (int error_code, CStringRef message)
 
 ~SystemError () throw ()
 
int error_code () const
 

Protected Types

typedef char Char
 

Protected Member Functions

 SystemError ()
 
- Protected Member Functions inherited from fmt::internal::RuntimeError
 RuntimeError ()
 
 ~RuntimeError () throw ()
 

Protected Attributes

int error_code_
 

Private Member Functions

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.

Definition at line 2264 of file format.h.

Member Typedef Documentation

typedef char fmt::SystemError::Char
protected

Definition at line 2271 of file format.h.

Constructor & Destructor Documentation

fmt::SystemError::SystemError ( )
inlineprotected

Definition at line 2273 of file format.h.

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);

Definition at line 2294 of file format.h.

References FMT_VARIADIC_CTOR.

FMT_FUNC fmt::SystemError::~SystemError ( )
throw (
)

Definition at line 86 of file format.cc.

Member Function Documentation

int fmt::SystemError::error_code ( ) const
inline

Definition at line 2301 of file format.h.

References FMT_API, FMT_NOEXCEPT, and fmt::internal::format_system_error().

+ Here is the call graph for this function:

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

Definition at line 225 of file format.cc.

References fmt::format(), fmt::internal::format_system_error(), and fmt::BasicWriter< Char >::str().

+ Here is the call graph for this function:

Member Data Documentation

int fmt::SystemError::error_code_
protected

Definition at line 2269 of file format.h.


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