|
DIY
3.0
data-parallel out-of-core C++ library
|
#include <diy/fmt/format.h>
Public Member Functions | |
| SystemError (int error_code, CStringRef message) | |
| int | error_code () const |
Protected Types | |
| typedef char | Char |
Protected Attributes | |
| int | error_code_ |
Additional Inherited Members | |
Protected Member Functions inherited from fmt::internal::RuntimeError | |
| RuntimeError (const RuntimeError &rerr) | |
An error returned by an operating system or a language runtime, for example a file opening error.
|
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);
1.8.6