NN_DBG_CHECK_RESULT

NN_DBG_CHECK_RESULT Macro

Syntax

#include <nn/dbg.h>

#define NN_DBG_CHECK_RESULT(exp)

Arguments

Name Description
in exp The result to be tested.

Description

Tests whether Result represents success.

This function presumes that exp is defined as a nn::Result type. It stops program execution if exp.IsSuccess function returns FALSE.

Unlike assert-type macros, exp is always evaluated one time only. exp is evaluated even if NN_SWITCH_DISABLE_ASSERT_WARNING or NN_SWITCH_DISABLE_DEBUG_PRINT has been defined.

If NN_SWITCH_DISABLE_ASSERT_WARNING has been defined, no testing is performed and program execution does not stop.

If NN_SWITCH_DISABLE_DEBUG_PRINT is defined, testing is performed and program execution may stop depending on test results, but nothing is output to debug output.

Revision History

2011/12/16
Initial version.

CONFIDENTIAL