ui-utilcpp 1.10.1
Public Member Functions | Static Public Attributes
UI::Exception Class Reference

Generic exception class for namespace UI. More...

#include <Exception.hpp>

Inheritance diagram for UI::Exception:
Inheritance graph
Collaboration diagram for UI::Exception:
Collaboration graph

Public Member Functions

 Exception (std::string const &what=NoWhatGiven_, std::string const &debug=NoDebugGiven_, int const &errNo=0)
 Construct with description text. More...
 
Get exception information.
char const * what () const throw ()
 
int const & getErrno () const
 
std::string getDebug () const
 

Static Public Attributes

static std::string const Errno_
 If this string is used in a "what" description message, it will be replaced by an errno error string.
 

Static Protected Attributes

These constants may be used for description default values for derived classes.
static std::string const NoWhatGiven_
 
static std::string const NoDebugGiven_
 

Detailed Description

Generic exception class for namespace UI.

Exception HOWTO

User's guide (exception handlers)

Developer's guide (write own exception classes)

Preliminaries

Quickstart

Let's say, you invented a new namespace "UI::Humbug".

The above three points typically go into "Exception.hpp" of your project.

Examples
EchoServer.cpp.

Constructor & Destructor Documentation

◆ Exception()

UI::Exception::Exception ( std::string const &  what = NoWhatGiven_,
std::string const &  debug = NoDebugGiven_,
int const &  errNo = 0 
)

Construct with description text.

Note
You usually do not call this constructor directly, but instead always use one of the UI_THROW_* macros above.
Parameters
whatException description. Errno_ text in string will be replaced with error string.
debugAny debug text.
errNoDedicated "errno" error number.

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