Project

General

Profile

Actions

Support Request #2430

closed

RETURN_IF_FAILED_AND_LOG_ERROR_STR does not work

Added by hidden about 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Customer:
AUDI
Department:
EX
Requester's Priority:
Normal
Support Level:
3rd Level
Resolution:
Product Issue Opened
Affected Products:
Platform:
Windows 7 64bit
Topic:
ADTF::Common
FAQ Links:

Description

Supportanfrage

ich möchte im Fehlerfall eine Logausgabe für einen tResult und dann aus der Methode springen.
Im konkreten Fall muss die Beschreibung vom tResult nicht um eine eigenen String erweitert werden. Also eigentlich will ich ein RETURN_IF_FAILED_AND_LOG_ERROR.
Dabei scheint mir das Macro RETURN_IF_FAILED_AND_LOG_ERROR_STR nicht zu funktionieren. Nebenbei: Der zweite Parameter wird im Macro nicht verwendet.

Der Code ...

if (IS_FAILED(nResult))
{
    LOG_RESULT(nResult);
    RETURN_IF_FAILED_AND_LOG_ERROR_STR(nResult);
    return nResult;
}

... liefert für ein ERR_NOT_CONNECTED von einem cSampleReader::GetNextSample

2018-04-27 15:11:06 [ERROR]: Result code '-35 '(ERR_NOT_CONNECTED) - [File: ] [Line: -1] [Func: ] [Displaysystemcheck_filter.cpp(806)]
2018-04-27 15:11:06 [INFO]: Result code '0 '(ERR_NOERROR) - No error occurred [File: ] [Line: -1] [Func: ] [Displaysystemcheck_filter.cpp(807)]

Lösung

ACORE-9489 angelegt

Actions

Also available in: Atom PDF