Option++  2.0
C++ library for reading command-line options
Public Member Functions | List of all members
optionpp::error Class Reference

Base class for library exceptions. More...

#include <error.hpp>

Inheritance diagram for optionpp::error:
Inheritance graph
[legend]
Collaboration diagram for optionpp::error:
Collaboration graph
[legend]

Public Member Functions

 error (const std::string &msg, const std::string &fn_name)
 Constructor. More...
 
const std::string & function () const
 Return the name of function that threw the exception. More...
 

Detailed Description

Base class for library exceptions.

Constructor & Destructor Documentation

◆ error()

optionpp::error::error ( const std::string &  msg,
const std::string &  fn_name 
)
inline

Constructor.

Parameters
msgDescription of the error.
fn_nameName of the function in which error occurred.

Member Function Documentation

◆ function()

const std::string& optionpp::error::function ( ) const
inline

Return the name of function that threw the exception.

Returns
Name of function that threw the exception.

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