libzypp 17.37.17
|
#include <iosfwd>
#include <string>
#include <list>
#include <stdexcept>
#include <typeinfo>
#include <type_traits>
#include <utility>
#include <zypp-core/base/Errno.h>
Go to the source code of this file.
Classes | |
struct | zypp::exception_detail::CodeLocation |
Keep FILE, FUNCTION and LINE. More... | |
class | zypp::Exception |
Base class for Exception. More... |
Namespaces | |
namespace | zypp |
Easy-to use interface to the ZYPP dependency resolver. | |
namespace | zypp::exception_detail |
Macros | |
#define | ZYPP_EX_CODELOCATION ::zypp::exception_detail::CodeLocation(( *__FILE__ == '/' ? strrchr( __FILE__, '/' ) + 1 : __FILE__ ),__FUNCTION__,__LINE__) |
Create CodeLocation object storing the current location. | |
#define | ZYPP_THROW(EXCPT) |
Drops a logline and throws the Exception. | |
#define | ZYPP_EXCPT_PTR(EXCPT) |
Drops a logline and returns Exception as a std::exception_ptr. | |
#define | ZYPP_FWD_EXCPT(EXCPT) |
Drops a logline and returns the given Exception as a std::exception_ptr. | |
#define | ZYPP_FWD_CURRENT_EXCPT() |
Drops a logline and returns the current Exception as a std::exception_ptr. | |
#define | ZYPP_CAUGHT(EXCPT) |
Drops a logline telling the Exception was caught (in order to handle it). | |
#define | ZYPP_RETHROW(EXCPT) |
Drops a logline and rethrows, updating the CodeLocation. | |
#define | ZYPP_THROW_MSG(EXCPTTYPE, MSG) |
Throw Exception built from a message string. | |
#define | ZYPP_THROW_ERRNO(EXCPTTYPE) |
Throw Exception built from errno. | |
#define | ZYPP_THROW_ERRNO1(EXCPTTYPE, ERRNO) |
Throw Exception built from errno provided as argument. | |
#define | ZYPP_THROW_ERRNO_MSG(EXCPTTYPE, MSG) |
Throw Exception built from errno and a message string. | |
#define | ZYPP_THROW_ERRNO_MSG1(EXCPTTYPE, ERRNO, MSG) |
Throw Exception built from errno provided as argument and a message string. |
Typedefs | |
template<class TExcpt> | |
using | zypp::exception_detail::EnableIfIsException = std::enable_if_t< std::is_base_of_v<Exception,TExcpt>, int> |
SFINAE: Hide template signature unless TExcpt is derived from Exception. | |
template<class TExcpt> | |
using | zypp::exception_detail::EnableIfNotException = std::enable_if_t< !std::is_base_of_v<Exception,TExcpt>, int> |
SFINAE: Hide template signature if TExcpt is derived from Exception. |
Functions | |
std::ostream & | zypp::operator<< (std::ostream &str, const std::exception_ptr &excptPtr) ZYPP_API |
Log a std::excepion_ptr. | |
template<class TExcpt, EnableIfIsException< TExcpt > = 0> | |
void | zypp::exception_detail::do_ZYPP_THROW (const TExcpt &excpt_r, const CodeLocation &where_r) __attribute__((noreturn)) |
Helper for ZYPP_THROW( Exception ). | |
template<class TExcpt, EnableIfIsException< TExcpt > = 0> | |
void | zypp::exception_detail::do_ZYPP_THROW (const TExcpt &excpt_r, CodeLocation &&where_r) __attribute__((noreturn)) |
template<class TExcpt, EnableIfNotException< TExcpt > = 0> | |
void | zypp::exception_detail::do_ZYPP_THROW (const TExcpt &excpt_r, const CodeLocation &where_r) __attribute__((noreturn)) |
Helper for ZYPP_THROW( not Exception ). | |
template<class TExcpt, EnableIfIsException< TExcpt > = 0> | |
void | zypp::exception_detail::do_ZYPP_CAUGHT (const TExcpt &excpt_r, const CodeLocation &where_r) |
Helper for ZYPP_THROW( Exception ). | |
template<class TExcpt, EnableIfNotException< TExcpt > = 0> | |
void | zypp::exception_detail::do_ZYPP_CAUGHT (const TExcpt &excpt_r, const CodeLocation &where_r) |
Helper for ZYPP_THROW( not Exception ). | |
void | zypp::exception_detail::do_ZYPP_CAUGHT (const std::exception_ptr &excpt_r, CodeLocation &&where_r) |
Helper for std::exception_ptr. | |
template<class TExcpt, EnableIfIsException< TExcpt > = 0> | |
void | zypp::exception_detail::do_ZYPP_RETHROW (const TExcpt &excpt_r, const CodeLocation &where_r) __attribute__((noreturn)) |
Helper for ZYPP_THROW( Exception ). | |
template<class TExcpt, EnableIfIsException< TExcpt > = 0> | |
void | zypp::exception_detail::do_ZYPP_RETHROW (const TExcpt &excpt_r, CodeLocation &&where_r) __attribute__((noreturn)) |
template<class TExcpt, EnableIfNotException< TExcpt > = 0> | |
void | zypp::exception_detail::do_ZYPP_RETHROW (const TExcpt &excpt_r, const CodeLocation &where_r) __attribute__((noreturn)) |
Helper for ZYPP_THROW( not Exception ). | |
void | zypp::exception_detail::do_ZYPP_RETHROW (const std::exception_ptr &excpt_r, const CodeLocation &where_r) |
template<class TExcpt> | |
std::exception_ptr | zypp::exception_detail::do_ZYPP_EXCPT_PTR (TExcpt &&excpt_r, CodeLocation &&where_r) |
Helper for ZYPP_EXCPT_PTR( Exception ). | |
std::exception_ptr | zypp::exception_detail::do_ZYPP_FWD_EXCPT_PTR (const std::exception_ptr &excpt_r, CodeLocation &&where_r) |
Helper for ZYPP_FWD_CURRENT_EXCPT(). |
#define ZYPP_EX_CODELOCATION ::zypp::exception_detail::CodeLocation(( *__FILE__ == '/' ? strrchr( __FILE__, '/' ) + 1 : __FILE__ ),__FUNCTION__,__LINE__) |
Create CodeLocation object storing the current location.
Definition at line 69 of file Exception.h.
#define ZYPP_THROW | ( | EXCPT | ) |
Drops a logline and throws the Exception.
Definition at line 459 of file Exception.h.
#define ZYPP_EXCPT_PTR | ( | EXCPT | ) |
Drops a logline and returns Exception as a std::exception_ptr.
Definition at line 463 of file Exception.h.
#define ZYPP_FWD_EXCPT | ( | EXCPT | ) |
Drops a logline and returns the given Exception as a std::exception_ptr.
Definition at line 467 of file Exception.h.
#define ZYPP_FWD_CURRENT_EXCPT | ( | ) |
Drops a logline and returns the current Exception as a std::exception_ptr.
Definition at line 471 of file Exception.h.
#define ZYPP_CAUGHT | ( | EXCPT | ) |
Drops a logline telling the Exception was caught (in order to handle it).
Definition at line 475 of file Exception.h.
#define ZYPP_RETHROW | ( | EXCPT | ) |
Drops a logline and rethrows, updating the CodeLocation.
Definition at line 479 of file Exception.h.
#define ZYPP_THROW_MSG | ( | EXCPTTYPE, | |
MSG ) |
Throw Exception built from a message string.
Definition at line 484 of file Exception.h.
#define ZYPP_THROW_ERRNO | ( | EXCPTTYPE | ) |
Throw Exception built from errno.
Definition at line 488 of file Exception.h.
#define ZYPP_THROW_ERRNO1 | ( | EXCPTTYPE, | |
ERRNO ) |
Throw Exception built from errno provided as argument.
Definition at line 492 of file Exception.h.
#define ZYPP_THROW_ERRNO_MSG | ( | EXCPTTYPE, | |
MSG ) |
Throw Exception built from errno and a message string.
Definition at line 496 of file Exception.h.
#define ZYPP_THROW_ERRNO_MSG1 | ( | EXCPTTYPE, | |
ERRNO, | |||
MSG ) |
Throw Exception built from errno provided as argument and a message string.
Definition at line 500 of file Exception.h.