SEDNL  .
Simple Event Driven Network Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | List of all members
SedNL::TemplateException< T > Class Template Reference

Describe how to build a SedNL::Exception. More...

#include <Exception.hpp>

Inheritance diagram for SedNL::TemplateException< T >:
SedNL::Exception

Public Member Functions

 TemplateException (T type)
 Create an Exception from an error code. More...
 
 TemplateException (T type, const char *msg)
 Create an exception with a message. More...
 
get_type ()
 Return the type of the exception.
 
const char * get_message ()
 Return an attached message. More...
 
virtual const char * what () const noexcept
 Return a message describing the exception, based on it's type.
 

Detailed Description

template<typename T>
class SedNL::TemplateException< T >

Describe how to build a SedNL::Exception.

Definition at line 117 of file Exception.hpp.

Constructor & Destructor Documentation

template<typename T >
SedNL::TemplateException< T >::TemplateException ( type)
inline

Create an Exception from an error code.

Parameters
[in]typeError code.

Definition at line 41 of file Exception.ipp.

template<typename T >
SedNL::TemplateException< T >::TemplateException ( type,
const char *  msg 
)
inline

Create an exception with a message.

The message should be a static string (you shouldn't use string from std::string::c_str() or anything that will be destructed / freed).

Parameters
[in]typeError code.
[in]msgMessage.

Definition at line 46 of file Exception.ipp.

Member Function Documentation

template<typename T >
const char * SedNL::TemplateException< T >::get_message ( )
inline

Return an attached message.

Return system-dependent error message, given by a call to strerror for example.

Returns
A message, or nullptr if nothing is available.

Definition at line 35 of file Exception.ipp.


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