libwreport 2.1
Public Member Functions | Static Public Member Functions | Data Fields
wreport::error_system Struct Reference

Report a system error message. More...

#include <error.h>

Inheritance diagram for wreport::error_system:
wreport::error

Public Member Functions

 error_system (const std::string &msg)
 Create an exception taking further information from errno.
 error_system (const std::string &msg, int errno_val)
 Create an exception taking further information from an explicit errno value.
ErrorCode code () const throw ()
 Exception-specific error code.
virtual const char * what () const throw ()
 Error message.

Static Public Member Functions

static void throwf (const char *fmt,...) WREPORT_THROWF_ATTRS(1
 Throw the exception, building the message printf-style.

Data Fields

std::string msg
 error message returned by what()

Detailed Description

Report a system error message.

The message description will be looked up using the current value of errno.


Constructor & Destructor Documentation

wreport::error_system::error_system ( const std::string &  msg)

Create an exception taking further information from errno.

Parameters:
msgerror message
wreport::error_system::error_system ( const std::string &  msg,
int  errno_val 
)

Create an exception taking further information from an explicit errno value.

Parameters:
msgerror message
errno_valexplicit errno value

Member Function Documentation

ErrorCode wreport::error_system::code ( ) const throw () [inline, virtual]

Exception-specific error code.

This is useful to map C++ exceptions to C or Fortran error codes

Implements wreport::error.

References wreport::WR_ERR_SYSTEM.


The documentation for this struct was generated from the following file: