STXXL
1.4.1
|
#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 122 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 34 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 48 of file error_handling.h.
Referenced by stxxl::create_file(), stxxl::disk_config::fileio_string(), 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 40 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, self_type >::node_cache(), stxxl::priority_queue< ConfigType >::refill_delete_buffer(), and stxxl::btree::iterator_map< self_type >::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 90 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 60 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::linuxaio_queue::linuxaio_queue(), stxxl::ufs_file_base::lock(), stxxl::linuxaio_request::post(), stxxl::linuxaio_queue::post_requests(), stxxl::syscall_file::serve(), stxxl::mmap_file::serve(), stxxl::ufs_file_base::ufs_file_base(), stxxl::ufs_file_base::unlink(), and stxxl::linuxaio_queue::wait_requests().
#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 54 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 112 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 100 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 116 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 108 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 78 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 64 of file error_handling.h.
Referenced by stxxl::request_queue_impl_1q::add_request(), stxxl::request_queue_impl_qwqr::add_request(), stxxl::linuxaio_queue::add_request(), stxxl::request_queue_impl_1q::cancel_request(), stxxl::request_queue_impl_qwqr::cancel_request(), and stxxl::linuxaio_queue::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 94 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 86 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 70 of file error_handling.h.
Referenced by stxxl::stream::basic_runs_merger< typename runs_creator_type::sorted_runs_type, cmp_type, alloc_strategy_type >::fill_buffer_block(), stxxl::stream::basic_runs_merger< typename runs_creator_type::sorted_runs_type, cmp_type, alloc_strategy_type >::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 135 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().