VideoTools
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
G::Exception Class Reference

A general-purpose exception class derived from std::exception and containing a std::string. More...

#include <gexception.h>

+ Inheritance diagram for G::Exception:

Public Member Functions

 Exception (const char *what)
 Constructor.
 
 Exception (const std::string &what)
 Constructor.
 
 Exception (const char *what, const std::string &more)
 Constructor.
 
 Exception (const std::string &what, const std::string &more)
 Constructor.
 
 Exception (const std::string &what, const std::string &more1, const std::string &more2)
 Constructor.
 
 Exception (const std::string &what, const std::string &more1, const std::string &more2, const std::string &more3)
 Constructor.
 
virtual ~Exception () g__noexcept
 Destructor.
 
virtual const char * what () const g__noexcept override
 Override from std::exception.
 
void prepend (const char *context)
 Prepends context to the what string. More...
 
void append (const char *more)
 Appends 'more' to the what string. More...
 
void append (const std::string &more)
 Appends 'more' to the what string. More...
 

Protected Attributes

std::string m_what
 

Detailed Description

A general-purpose exception class derived from std::exception and containing a std::string.

Provides constructors that simplify the assembly of multi-part error messages.

Usage:

throw G::Exception( "initialisation error" , "no such file" , path ) ;

Definition at line 43 of file gexception.h.

Member Function Documentation

void G::Exception::append ( const char *  more)

Appends 'more' to the what string.

Inserts a separator as needed.

Definition at line 70 of file gexception.cpp.

void G::Exception::append ( const std::string &  more)

Appends 'more' to the what string.

Inserts a separator as needed.

Definition at line 79 of file gexception.cpp.

void G::Exception::prepend ( const char *  context)

Prepends context to the what string.

Inserts a separator as needed.

Definition at line 88 of file gexception.cpp.


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