Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
catch_enforce.h File Reference
#include "catch_common.h"
#include "catch_compiler_capabilities.h"
#include "catch_stream.h"
#include <stdexcept>
Include dependency graph for catch_enforce.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Catch
 

Macros

#define CATCH_PREPARE_EXCEPTION(type, msg)
 
#define CATCH_INTERNAL_ERROR(msg)
 
#define CATCH_ERROR(msg)
 
#define CATCH_RUNTIME_ERROR(msg)
 
#define CATCH_ENFORCE(condition, msg)
 

Functions

void Catch::throw_exception (std::exception const &e)
 

Macro Definition Documentation

◆ CATCH_ENFORCE

#define CATCH_ENFORCE ( condition,
msg )
Value:
do{ if( !(condition) ) CATCH_ERROR( msg ); } while(false)
#define CATCH_ERROR(msg)

Definition at line 38 of file catch_enforce.h.

38#define CATCH_ENFORCE( condition, msg ) \
39 do{ if( !(condition) ) CATCH_ERROR( msg ); } while(false)

◆ CATCH_ERROR

#define CATCH_ERROR ( msg)
Value:
#define CATCH_PREPARE_EXCEPTION(type, msg)
void throw_exception(std::exception const &e)

Definition at line 34 of file catch_enforce.h.

34#define CATCH_ERROR( msg ) \
35 Catch::throw_exception(CATCH_PREPARE_EXCEPTION( std::domain_error, msg ))

◆ CATCH_INTERNAL_ERROR

#define CATCH_INTERNAL_ERROR ( msg)
Value:
Catch::throw_exception(CATCH_PREPARE_EXCEPTION( std::logic_error, CATCH_INTERNAL_LINEINFO << ": Internal Catch error: " << msg))
#define CATCH_INTERNAL_LINEINFO

Definition at line 32 of file catch_enforce.h.

32#define CATCH_INTERNAL_ERROR( msg ) \
33 Catch::throw_exception(CATCH_PREPARE_EXCEPTION( std::logic_error, CATCH_INTERNAL_LINEINFO << ": Internal Catch error: " << msg))

◆ CATCH_PREPARE_EXCEPTION

#define CATCH_PREPARE_EXCEPTION ( type,
msg )
Value:
type( ( Catch::ReusableStringStream() << msg ).str() )
yh_object_type type
Definition yubihsm.h:672

Definition at line 30 of file catch_enforce.h.

30#define CATCH_PREPARE_EXCEPTION( type, msg ) \
31 type( ( Catch::ReusableStringStream() << msg ).str() )

◆ CATCH_RUNTIME_ERROR

#define CATCH_RUNTIME_ERROR ( msg)
Value:
Catch::throw_exception(CATCH_PREPARE_EXCEPTION( std::runtime_error, msg ))

Definition at line 36 of file catch_enforce.h.

36#define CATCH_RUNTIME_ERROR( msg ) \
37 Catch::throw_exception(CATCH_PREPARE_EXCEPTION( std::runtime_error, msg ))