Include dependency graph for logging.h:

Defines

#define PP_DCHECK(a)   assert(a)
#define PP_NOTREACHED()   assert(false)

Detailed Description

This file defines two macro asserts.


Define Documentation

#define PP_DCHECK( a)   assert(a)

This macro asserts that 'a' evaluates to true.

In debug mode, this macro will crash the program if the assertion evaluates to false. It (typically) has no effect in release mode.

#define PP_NOTREACHED()   assert(false)

This macro asserts false in debug builds.

It's used in code paths that you don't expect to execute.

Example:

 if (!pointer) {
 // Pointer wasn't valid! This shouldn't happen.
 PP_NOTREACHED();
 return;
 }
 // Do stuff to the pointer, since you know it's valid.
 pointer->DoSomething();
This site uses cookies to deliver and enhance the quality of its services and to analyze traffic. If you agree, cookies are also used to serve advertising and to personalize the content and advertisements that you see. Learn more about our use of cookies.