Template Class PosixErrorHandler

Class Documentation

template<typename ThrowingClass>
class PosixErrorHandler

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.

Public Functions

inline virtual ~PosixErrorHandler()

Public Static Functions

static inline StandardException GenerateStandardException(const char *loc)

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.