Public Member Functions | Static Public Member Functions
ecl::PosixErrorHandler< ThrowingClass > Class Template Reference

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

#include <posix_error_handler.hpp>

List of all members.

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

template<typename ThrowingClass >
virtual ecl::PosixErrorHandler< ThrowingClass >::~PosixErrorHandler ( ) [inline, virtual]

Definition at line 72 of file posix_error_handler.hpp.


Member Function Documentation

template<typename ThrowingClass >
static StandardException ecl::PosixErrorHandler< ThrowingClass >::GenerateStandardException ( const char *  loc) [inline, static]

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 (d.stonier@gmail.com)
autogenerated on Thu Jan 2 2014 11:11:54