STXXL
1.4.0
|
#include <sstream>
#include <cerrno>
#include <cstring>
#include <stxxl/bits/namespace.h>
#include <stxxl/bits/common/exceptions.h>
#include <stxxl/bits/config.h>
Go to the source code of this file.
Namespaces | |
stxxl | |
STXXL library namespace | |
Macros | |
#define | STXXL_CHECK_PTHREAD_CALL(expr) |
Checks pthread call, if return != 0, throws stxxl::resource_error with "Error in [function] : [pthread_expr] : [errno message]. More... | |
#define | STXXL_PRETTY_FUNCTION_NAME __PRETTY_FUNCTION__ |
#define | STXXL_THROW(exception_type, error_message) |
Throws exception_type with "Error in [function] : [error_message]". More... | |
#define | STXXL_THROW2(exception_type, location, error_message) |
Throws exception_type with "Error in [location] : [error_message]". More... | |
#define | STXXL_THROW_EQ_0(expr, exception_type, error_message) STXXL_THROW_IF((expr) == 0, exception_type, error_message) |
Throws exception_type if (expr == 0) with "Error in [function] : [error_message]". More... | |
#define | STXXL_THROW_ERRNO(exception_type, error_message) STXXL_THROW_ERRNO2(exception_type, error_message, errno) |
Throws exception_type with "Error in [function] : [error_message] : [errno message]". More... | |
#define | STXXL_THROW_ERRNO2(exception_type, error_message, errno_value) |
Throws exception_type with "Error in [function] : [error_message] : [errno_value message]". More... | |
#define | STXXL_THROW_ERRNO_EQ_0(expr, exception_type, error_message) STXXL_THROW_ERRNO_IF((expr) == 0, exception_type, error_message) |
Throws exception_type if (expr == 0) with "Error in [function] : [error_message] : [errno message]". More... | |
#define | STXXL_THROW_ERRNO_IF(expr, exception_type, error_message) |
Throws exception_type if (expr) with "Error in [function] : [error_message] : [errno message]". More... | |
#define | STXXL_THROW_ERRNO_LT_0(expr, exception_type, error_message) STXXL_THROW_ERRNO_IF((expr) < 0, exception_type, error_message) |
Throws exception_type if (expr < 0) with "Error in [function] : [error_message] : [errno message]". More... | |
#define | STXXL_THROW_ERRNO_NE_0(expr, exception_type, error_message) STXXL_THROW_ERRNO_IF((expr) != 0, exception_type, error_message) |
Throws exception_type if (expr != 0) with "Error in [function] : [error_message] : [errno message]". More... | |
#define | STXXL_THROW_IF(expr, exception_type, error_message) |
Throws exception_type if (expr) with "Error in [function] : [error_message]". More... | |
#define | STXXL_THROW_INVALID_ARGUMENT(error_message) |
Throws std::invalid_argument with "Error in [function] : [error_message]". More... | |
#define | STXXL_THROW_LT_0(expr, exception_type, error_message) STXXL_THROW_IF((expr) < 0, exception_type, error_message) |
Throws exception_type if (expr < 0) with "Error in [function] : [error_message]". More... | |
#define | STXXL_THROW_NE_0(expr, exception_type, error_message) STXXL_THROW_IF((expr) != 0, exception_type, error_message) |
Throws exception_type if (expr != 0) with "Error in [function] : [error_message]". More... | |
#define | STXXL_THROW_UNREACHABLE() |
Throws stxxl::unreachable with "Error in file [file], line [line] : this code should never be reachable". More... | |
#define | STXXL_THROW_WIN_LASTERROR(exception_type, error_message) |
Throws exception_type with "Error in [function] : [error_message] : [formatted GetLastError()]". More... | |
Macros for convenient error checking and reporting via exception.
Definition in file error_handling.h.
#define STXXL_CHECK_PTHREAD_CALL | ( | expr | ) |
Checks pthread call, if return != 0, throws stxxl::resource_error with "Error in [function] : [pthread_expr] : [errno message].
Definition at line 123 of file error_handling.h.
Referenced by stxxl::condition_variable::condition_variable(), stxxl::mutex::lock(), stxxl::mutex::mutex(), stxxl::condition_variable::notify_all(), stxxl::condition_variable::notify_one(), stxxl::request_queue_impl_worker::start_thread(), stxxl::request_queue_impl_worker::stop_thread(), stxxl::mutex::unlock(), stxxl::condition_variable::wait(), stxxl::condition_variable::~condition_variable(), and stxxl::mutex::~mutex().
#define STXXL_PRETTY_FUNCTION_NAME __PRETTY_FUNCTION__ |
Definition at line 35 of file error_handling.h.
Referenced by stxxl::stream::materialize(), stxxl::grow_shrink_stack< StackConfig >::~grow_shrink_stack(), and stxxl::normal_stack< StackConfig >::~normal_stack().
#define STXXL_THROW | ( | exception_type, | |
error_message | |||
) |
Throws exception_type with "Error in [function] : [error_message]".
Definition at line 49 of file error_handling.h.
Referenced by stxxl::create_file(), stxxl::config::load_config_file(), stxxl::disk_config::parse_fileio(), and stxxl::disk_config::parse_line().
#define STXXL_THROW2 | ( | exception_type, | |
location, | |||
error_message | |||
) |
Throws exception_type with "Error in [location] : [error_message]".
Definition at line 41 of file error_handling.h.
Referenced by stxxl::disk_allocator::add_free_region(), stxxl::btree::btree< KeyType, DataType, CompareType, RawNodeSize, RawLeafSize, PDAllocStrategy >::bulk_construction(), stxxl::btree::btree< KeyType, DataType, CompareType, RawNodeSize, RawLeafSize, PDAllocStrategy >::insert_into_root(), stxxl::btree::node_cache< leaf_type, SelfType >::node_cache(), stxxl::priority_queue< ConfigType >::refill_delete_buffer(), and stxxl::btree::iterator_map< SelfType >::unregister_iterator().
#define STXXL_THROW_EQ_0 | ( | expr, | |
exception_type, | |||
error_message | |||
) | STXXL_THROW_IF((expr) == 0, exception_type, error_message) |
Throws exception_type if (expr == 0) with "Error in [function] : [error_message]".
Definition at line 91 of file error_handling.h.
#define STXXL_THROW_ERRNO | ( | exception_type, | |
error_message | |||
) | STXXL_THROW_ERRNO2(exception_type, error_message, errno) |
Throws exception_type with "Error in [function] : [error_message] : [errno message]".
Definition at line 61 of file error_handling.h.
Referenced by stxxl::ufs_file_base::_size(), stxxl::ufs_file_base::close(), stxxl::fileperblock_file< base_file_type >::export_files(), stxxl::ufs_file_base::lock(), stxxl::mmap_file::serve(), stxxl::syscall_file::serve(), stxxl::ufs_file_base::ufs_file_base(), and stxxl::ufs_file_base::unlink().
#define STXXL_THROW_ERRNO2 | ( | exception_type, | |
error_message, | |||
errno_value | |||
) |
Throws exception_type with "Error in [function] : [error_message] : [errno_value message]".
Definition at line 55 of file error_handling.h.
Referenced by stxxl::mutex::~mutex().
#define STXXL_THROW_ERRNO_EQ_0 | ( | expr, | |
exception_type, | |||
error_message | |||
) | STXXL_THROW_ERRNO_IF((expr) == 0, exception_type, error_message) |
Throws exception_type if (expr == 0) with "Error in [function] : [error_message] : [errno message]".
Definition at line 113 of file error_handling.h.
#define STXXL_THROW_ERRNO_IF | ( | expr, | |
exception_type, | |||
error_message | |||
) |
Throws exception_type if (expr) with "Error in [function] : [error_message] : [errno message]".
Definition at line 101 of file error_handling.h.
#define STXXL_THROW_ERRNO_LT_0 | ( | expr, | |
exception_type, | |||
error_message | |||
) | STXXL_THROW_ERRNO_IF((expr) < 0, exception_type, error_message) |
Throws exception_type if (expr < 0) with "Error in [function] : [error_message] : [errno message]".
Definition at line 117 of file error_handling.h.
Referenced by stxxl::ufs_file_base::_set_size().
#define STXXL_THROW_ERRNO_NE_0 | ( | expr, | |
exception_type, | |||
error_message | |||
) | STXXL_THROW_ERRNO_IF((expr) != 0, exception_type, error_message) |
Throws exception_type if (expr != 0) with "Error in [function] : [error_message] : [errno message]".
Definition at line 109 of file error_handling.h.
Referenced by stxxl::ufs_file_base::_after_open(), stxxl::ufs_file_base::_set_size(), and stxxl::mmap_file::serve().
#define STXXL_THROW_IF | ( | expr, | |
exception_type, | |||
error_message | |||
) |
Throws exception_type if (expr) with "Error in [function] : [error_message]".
Definition at line 79 of file error_handling.h.
#define STXXL_THROW_INVALID_ARGUMENT | ( | error_message | ) |
Throws std::invalid_argument with "Error in [function] : [error_message]".
Definition at line 65 of file error_handling.h.
Referenced by stxxl::request_queue_impl_1q::add_request(), stxxl::request_queue_impl_qwqr::add_request(), stxxl::request_queue_impl_1q::cancel_request(), and stxxl::request_queue_impl_qwqr::cancel_request().
#define STXXL_THROW_LT_0 | ( | expr, | |
exception_type, | |||
error_message | |||
) | STXXL_THROW_IF((expr) < 0, exception_type, error_message) |
Throws exception_type if (expr < 0) with "Error in [function] : [error_message]".
Definition at line 95 of file error_handling.h.
#define STXXL_THROW_NE_0 | ( | expr, | |
exception_type, | |||
error_message | |||
) | STXXL_THROW_IF((expr) != 0, exception_type, error_message) |
Throws exception_type if (expr != 0) with "Error in [function] : [error_message]".
Definition at line 87 of file error_handling.h.
#define STXXL_THROW_UNREACHABLE | ( | ) |
Throws stxxl::unreachable with "Error in file [file], line [line] : this code should never be reachable".
Definition at line 71 of file error_handling.h.
Referenced by stxxl::stream::basic_runs_merger< sorted_runs_type, CompareType_, AllocStr_ >::fill_buffer_block(), stxxl::stream::basic_runs_merger< sorted_runs_type, CompareType_, AllocStr_ >::initialize(), and stxxl::sort_local::merge_runs().
#define STXXL_THROW_WIN_LASTERROR | ( | exception_type, | |
error_message | |||
) |
Throws exception_type with "Error in [function] : [error_message] : [formatted GetLastError()]".
Definition at line 136 of file error_handling.h.
Referenced by stxxl::ufs_file_base::_set_size(), stxxl::wfs_file_base::_size(), stxxl::wfs_file_base::close(), stxxl::config::load_default_config(), stxxl::wfs_file_base::lock(), stxxl::open_file_impl(), and stxxl::wfs_file_base::set_size().