ADTF Qt5
Loading...
Searching...
No Matches
error_handling.h File Reference
#include <QtGlobal>
Include dependency graph for error_handling.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ADTF_THROW_QT_ERROR(__result)
 Throws an error/exception in case of error within Qt.
 
#define EXCEPTION_TO_SCRIPT_ERROR(__return_value)
 Converts an exception to an error code.
 
#define SCRIPT_ERROR_IF_FAILED(__exp)
 Throws an error/exception in case of error in script.
 

Detailed Description

Copyright © Audi Electronics Venture GmbH. All rights reserved

Macro Definition Documentation

◆ ADTF_THROW_QT_ERROR

#define ADTF_THROW_QT_ERROR ( __result)
Value:
m_oEngine.throwError(to_string(__result).GetPtr());

Throws an error/exception in case of error within Qt.

◆ EXCEPTION_TO_SCRIPT_ERROR

#define EXCEPTION_TO_SCRIPT_ERROR ( __return_value)
Value:
catch (const tResult& oError) \
{ \
ADTF_THROW_QT_ERROR(oError); \
return __return_value; \
}

Converts an exception to an error code.

◆ SCRIPT_ERROR_IF_FAILED

#define SCRIPT_ERROR_IF_FAILED ( __exp)
Value:
try \
{ \
auto oResult = (__exp); \
THROW_IF_FAILED(oResult); \
} \
catch (const tResult& oError) \
{ \
ADTF_THROW_QT_ERROR(oError); \
return; \
}

Throws an error/exception in case of error in script.