Stxxl  1.4.0
Namespaces | Defines | Functions
include/stxxl/bits/common/error_handling.h File Reference
#include <sstream>
#include <cerrno>
#include <cstring>
#include <stxxl/bits/namespace.h>
#include <stxxl/bits/common/exceptions.h>
Include dependency graph for error_handling.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  stxxl
 

<stxxl> library namespace


Defines

#define _STXXL_STRING(x)   # x
#define STXXL_PRETTY_FUNCTION_NAME   __PRETTY_FUNCTION__
#define STXXL_THROW(exception_type, location, error_message)
#define STXXL_THROW2(exception_type, error_message)
#define STXXL_THROW_INVALID_ARGUMENT(error_message)
#define STXXL_THROW_UNREACHABLE()
#define stxxl_function_error(exception_type)   stxxl::stxxl_util_function_error<exception_type>(STXXL_PRETTY_FUNCTION_NAME)
#define check_pthread_call(expr)   stxxl::helper_check_eq_0<stxxl::resource_error>(expr, STXXL_PRETTY_FUNCTION_NAME, _STXXL_STRING(expr), true)
#define stxxl_check_ge_0(expr, exception_type)   stxxl::helper_check_ge_0<exception_type>(expr, STXXL_PRETTY_FUNCTION_NAME)
#define stxxl_check_ne_0(expr, exception_type)   stxxl::helper_check_ne_0<exception_type>(expr, STXXL_PRETTY_FUNCTION_NAME)

Functions

template<typename E >
void stxxl::stxxl_util_function_error (const char *func_name, const char *expr=0, const char *error=0)
template<typename E >
bool stxxl::helper_check_success (bool success, const char *func_name, const char *expr=0, const char *error=0)
template<typename E , typename INT >
bool stxxl::helper_check_eq_0 (INT res, const char *func_name, const char *expr, bool res_2_strerror=false)
template<typename E , typename INT >
bool stxxl::helper_check_ge_0 (INT res, const char *func_name)
template<typename E , typename INT >
bool stxxl::helper_check_ne_0 (INT res, const char *func_name)

Define Documentation

#define _STXXL_STRING (   x)    # x

Definition at line 26 of file error_handling.h.

#define stxxl_check_ge_0 (   expr,
  exception_type 
)    stxxl::helper_check_ge_0<exception_type>(expr, STXXL_PRETTY_FUNCTION_NAME)

Definition at line 95 of file error_handling.h.

Referenced by stxxl::ufs_file_base::_size(), and stxxl::ufs_file_base::set_size().

#define stxxl_check_ne_0 (   expr,
  exception_type 
)    stxxl::helper_check_ne_0<exception_type>(expr, STXXL_PRETTY_FUNCTION_NAME)

Definition at line 104 of file error_handling.h.

Referenced by stxxl::config::init().

#define stxxl_function_error (   exception_type)    stxxl::stxxl_util_function_error<exception_type>(STXXL_PRETTY_FUNCTION_NAME)
#define STXXL_PRETTY_FUNCTION_NAME   __PRETTY_FUNCTION__
#define STXXL_THROW (   exception_type,
  location,
  error_message 
)
#define STXXL_THROW2 (   exception_type,
  error_message 
)
Value:
STXXL_THROW(exception_type, "function " << STXXL_PRETTY_FUNCTION_NAME, \
                "Info: " << error_message << " " << strerror(errno))

Definition at line 43 of file error_handling.h.

Referenced by stxxl::ufs_file_base::lock(), stxxl::syscall_file::serve(), and stxxl::ufs_file_base::ufs_file_base().

#define STXXL_THROW_INVALID_ARGUMENT (   error_message)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines