Public Member Functions | Static Public Member Functions | List of all members
ecl::PosixErrorHandler< ThrowingClass > Class Template Reference

Provides c++ mechanisms for handling posix errors. More...

#include <posix_error_handler.hpp>

Public Member Functions

virtual ~PosixErrorHandler ()
 

Static Public Member Functions

static StandardException GenerateStandardException (const char *loc)
 

Detailed Description

template<typename ThrowingClass>
class ecl::PosixErrorHandler< ThrowingClass >

Provides c++ mechanisms for handling posix errors.

This class is a parent template for handling posix errors thrown by a generic base class. Currently it only serves one purpose, that is to redirect posix errors generated via the errno mechanism to StandardException objects. If you wish to customise the output of posix errors for different objects then simply specialise this class for the given object. See PosixErrorHandler<ecl::time::TimeStamp> for an example specialisation.

See also
StandardException, Exceptions Guide.

Definition at line 58 of file posix_error_handler.hpp.

Constructor & Destructor Documentation

◆ ~PosixErrorHandler()

template<typename ThrowingClass >
virtual ecl::PosixErrorHandler< ThrowingClass >::~PosixErrorHandler ( )
inlinevirtual

Definition at line 72 of file posix_error_handler.hpp.

Member Function Documentation

◆ GenerateStandardException()

template<typename ThrowingClass >
static StandardException ecl::PosixErrorHandler< ThrowingClass >::GenerateStandardException ( const char *  loc)
inlinestatic

This static function is the general case response for generating StandardException objects from a posix errno value using the c strerror() function. To customise the response, specialise this class for the required object. See PosixErrorHandler<ecl::time::TimeStamp> for an example specialisation.

Parameters
loc: use with the LOC macro, identifies the line and file of the code.

Definition at line 69 of file posix_error_handler.hpp.


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


ecl_exceptions
Author(s): Daniel Stonier
autogenerated on Mon Feb 28 2022 22:18:26