ALib C++ Framework
by
Library Version: 2511 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::exceptions Namespace Reference

Nested Namespaces:

namespace  detail
 Internal details of namespace alib::exceptions.

Type Index:

struct  ERException
class  Exception
struct  Message

Function Index:

Exception CreateExceptionFromSystemError (const CallerInfo &ci, int errNo=errno)
Exception CreateExceptionFromSystemError (const CallerInfo &ci, std::error_code errorCode)
Exception CreateExceptionFromWindowsOSError (const CallerInfo &ci, DWORD winError)

Function Details:

◆ CreateExceptionFromSystemError() [1/2]

Exception alib::exceptions::CreateExceptionFromSystemError ( const CallerInfo & ci,
int errNo = errno )
inline

Overloaded version, which accepts an integral posix system exception. Uses std::make_error_code to create an object of type std::error_code to be passed to the original function.

Parameters
ciThe source location of the exception creation.
errNoThe system's error number. Defaults to system macro errno.
Returns
An exception object.

Definition at line 452 of file exception.inl.

◆ CreateExceptionFromSystemError() [2/2]

Exception alib::exceptions::CreateExceptionFromSystemError ( const CallerInfo & ci,
std::error_code errorCode )
inline

Creates an according Exception to a corresponding system error number. The following data is attached to the message:

  1. "{!Q} ({}){!X}" - Format string used with AString Format() const Note that the 3rd placeholder inhibits formatting the 4th. parameter.
  2. errorCode.message() - First format parameter.
  3. errorCode.category().name() - Second format parameter.
  4. errorCode - A copy of the error code.

The exceptions' enumeration type will be std::errc. The result of function std::error_code::message() is attched as a parameter

Parameters
ciThe source location of the exception creation.
errorCodeThe system's error number.
Returns
An exception object.

Definition at line 437 of file exception.inl.

◆ CreateExceptionFromWindowsOSError()

Exception alib::exceptions::CreateExceptionFromWindowsOSError ( const CallerInfo & ci,
DWORD winError )
inline

Overloaded version, which accepts a WindowsOS error code.

Parameters
ciThe source location of the exception creation.
winErrorA WindowsOS error number, i.e. received with GetLastError().
Returns
An exception object.

Definition at line 462 of file exception.inl.