ADTF  3.18.3
adtf_require.h File Reference

Copyright © Audi Electronics Venture GmbH. More...

Go to the source code of this file.

Macros

#define ADTF_REQUIRE(__exp)
 
#define ADTF_REQUIRE_OK(__exp)
 

Detailed Description

Copyright © Audi Electronics Venture GmbH.

All rights reserved

Definition in file adtf_require.h.

Macro Definition Documentation

◆ ADTF_REQUIRE

#define ADTF_REQUIRE (   __exp)
Value:
if (!(__exp)) \
{\
THROW_ERROR_DESC(ERR_FAILED, "test failed at %s:%d: %s", __FILE__, __LINE__, #__exp);\
}

Definition at line 9 of file adtf_require.h.

◆ ADTF_REQUIRE_OK

#define ADTF_REQUIRE_OK (   __exp)
Value:
{\
const auto __result = (__exp); \
if (IS_FAILED(__result)) \
{\
THROW_ERROR_DESC(ERR_FAILED, "test failed at %s:%d: %s %s", __FILE__, __LINE__, #__exp, adtf::util::to_string(__result).GetPtr());\
}\
}
cString to_string(const tResult &i_oResult, eResultFormatFlags i_eFormatFlags=eResultFormatFlags::RFF_DisableNone, const tChar *i_strFormat=nullptr)
Copy all information of an assigned result object to a (formatted) string.

Definition at line 15 of file adtf_require.h.