libzypp  17.5.0
ZYPP_THROW macros

Macros for throwing Exception. More...

Macros

#define ZYPP_THROW(EXCPT)   ::zypp::exception_detail::do_ZYPP_THROW( EXCPT, ZYPP_EX_CODELOCATION )
 Drops a logline and throws the Exception. More...
 
#define ZYPP_CAUGHT(EXCPT)   ::zypp::exception_detail::do_ZYPP_CAUGHT( EXCPT, ZYPP_EX_CODELOCATION )
 Drops a logline telling the Exception was caught (in order to handle it). More...
 
#define ZYPP_RETHROW(EXCPT)   ::zypp::exception_detail::do_ZYPP_RETHROW( EXCPT, ZYPP_EX_CODELOCATION )
 Drops a logline and rethrows, updating the CodeLocation. More...
 
#define ZYPP_THROW_MSG(EXCPTTYPE, MSG)   ZYPP_THROW( EXCPTTYPE( MSG ) )
 Throw Exception built from a message string. More...
 
#define ZYPP_THROW_ERRNO(EXCPTTYPE)   ZYPP_THROW( EXCPTTYPE( ::zypp::Exception::strErrno(errno) ) )
 Throw Exception built from errno. More...
 
#define ZYPP_THROW_ERRNO1(EXCPTTYPE, ERRNO)   ZYPP_THROW( EXCPTTYPE( ::zypp::Exception::strErrno(ERRNO) ) )
 Throw Exception built from errno provided as argument. More...
 
#define ZYPP_THROW_ERRNO_MSG(EXCPTTYPE, MSG)   ZYPP_THROW( EXCPTTYPE( ::zypp::Exception::strErrno(errno,MSG) ) )
 Throw Exception built from errno and a message string. More...
 
#define ZYPP_THROW_ERRNO_MSG1(EXCPTTYPE, ERRNO, MSG)   ZYPP_THROW( EXCPTTYPE( ::zypp::Exception::strErrno(ERRNO,MSG) ) )
 Throw Exception built from errno provided as argument and a message string. More...
 

Detailed Description

Macros for throwing Exception.

See also
zypp::Exception for an example.

Macro Definition Documentation

◆ ZYPP_THROW

#define ZYPP_THROW (   EXCPT)    ::zypp::exception_detail::do_ZYPP_THROW( EXCPT, ZYPP_EX_CODELOCATION )

Drops a logline and throws the Exception.

Definition at line 392 of file Exception.h.

◆ ZYPP_CAUGHT

#define ZYPP_CAUGHT (   EXCPT)    ::zypp::exception_detail::do_ZYPP_CAUGHT( EXCPT, ZYPP_EX_CODELOCATION )

Drops a logline telling the Exception was caught (in order to handle it).

Definition at line 396 of file Exception.h.

◆ ZYPP_RETHROW

#define ZYPP_RETHROW (   EXCPT)    ::zypp::exception_detail::do_ZYPP_RETHROW( EXCPT, ZYPP_EX_CODELOCATION )

Drops a logline and rethrows, updating the CodeLocation.

Definition at line 400 of file Exception.h.

◆ ZYPP_THROW_MSG

#define ZYPP_THROW_MSG (   EXCPTTYPE,
  MSG 
)    ZYPP_THROW( EXCPTTYPE( MSG ) )

Throw Exception built from a message string.

Definition at line 405 of file Exception.h.

◆ ZYPP_THROW_ERRNO

#define ZYPP_THROW_ERRNO (   EXCPTTYPE)    ZYPP_THROW( EXCPTTYPE( ::zypp::Exception::strErrno(errno) ) )

Throw Exception built from errno.

Definition at line 409 of file Exception.h.

◆ ZYPP_THROW_ERRNO1

#define ZYPP_THROW_ERRNO1 (   EXCPTTYPE,
  ERRNO 
)    ZYPP_THROW( EXCPTTYPE( ::zypp::Exception::strErrno(ERRNO) ) )

Throw Exception built from errno provided as argument.

Definition at line 413 of file Exception.h.

◆ ZYPP_THROW_ERRNO_MSG

#define ZYPP_THROW_ERRNO_MSG (   EXCPTTYPE,
  MSG 
)    ZYPP_THROW( EXCPTTYPE( ::zypp::Exception::strErrno(errno,MSG) ) )

Throw Exception built from errno and a message string.

Definition at line 417 of file Exception.h.

◆ ZYPP_THROW_ERRNO_MSG1

#define ZYPP_THROW_ERRNO_MSG1 (   EXCPTTYPE,
  ERRNO,
  MSG 
)    ZYPP_THROW( EXCPTTYPE( ::zypp::Exception::strErrno(ERRNO,MSG) ) )

Throw Exception built from errno provided as argument and a message string.

Definition at line 421 of file Exception.h.