libjmmcg  release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::LIBJMMCG_VER_NAMESPACE::syscall Namespace Reference

A wrapper for glibc or syscalls, etc. This function captures the return-code and if it is the specified failure-code, then according to the traits may capture any error information and throw it as an exception. More...

Namespaces

namespace  private_
 

Classes

struct  a_case_statement
 
struct  case_statements_t
 
struct  failure_traits
 
struct  simple_report_traits
 This is the default trait. More...
 
struct  switch_traits
 If different operations need to be performed on different return-codes, then this trait may be used. More...
 
struct  switch_wrapper_t
 
struct  traits_base
 The base of any trait in this file. This trait calls handle_error() if it detects a failure, otherwise returns the result of the wrapped function. More...
 

Typedefs

using exception_t = crt_exception< ppd::platform_api, ppd::heavyweight_threading >
 

Functions

template<template< class, class ... > class Traits, template< class, template< class > class, template< class > class > class FailureTraits, template< class > class FailureCode, template< class > class FailureDetection, class FnReturnType , class ... FnArgs, class ... PassedInArgs>
FnReturnType process (char const *const file_name, unsigned line_num, char const *const fn_name, tchar const *const rev_info, tchar const *const err_msg, FnReturnType(*fn)(FnArgs...), PassedInArgs ...args) noexcept(std::is_same< FnReturnType, void >::value)
 The function that wraps calling the C-style function. More...
 

Detailed Description

A wrapper for glibc or syscalls, etc. This function captures the return-code and if it is the specified failure-code, then according to the traits may capture any error information and throw it as an exception.

Typedef Documentation

◆ exception_t

Function Documentation

◆ process()

template<template< class, class ... > class Traits, template< class, template< class > class, template< class > class > class FailureTraits, template< class > class FailureCode, template< class > class FailureDetection, class FnReturnType , class ... FnArgs, class ... PassedInArgs>
FnReturnType jmmcg::LIBJMMCG_VER_NAMESPACE::syscall::process ( char const *const  file_name,
unsigned  line_num,
char const *const  fn_name,
tchar const *const  rev_info,
tchar const *const  err_msg,
FnReturnType(*)(FnArgs...)  fn,
PassedInArgs ...  args 
)
noexcept

The function that wraps calling the C-style function.