blob: 2f155d48f3d164ae2367126cf2e94f0a90627ae7 [file] [log] [blame]
{{+bindTo:partials.standard_nacl_api}}
<h1>logging.h File Reference</h1>
<div id="doxygen-ref">
{{- dummy div to appease doxygen -}}
<div>
<!-- Generated by Doxygen 1.7.6.1 -->
</div>
<!--header-->
<div class="contents">
<div class="textblock"><div class="dynheader">
Include dependency graph for logging.h:</div>
<div class="dyncontent">
<div class="center"><img src="logging_8h__incl.png" border="0" usemap="#logging_8h" alt="" /></div>
<map name="logging_8h" id="logging_8h">
</map>
</div>
</div><h2>
Defines</h2><table class="memberdecls">
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a5cb259e0fd1a8c0c64fbc891bc273417">PP_DCHECK</a>(a)&#160;&#160;&#160;assert(a)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a1c536418e751c9bda850cd2bc919e0ca">PP_NOTREACHED</a>()&#160;&#160;&#160;assert(false)</td></tr>
</table>
<hr /><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>This file defines two macro asserts. </p>
</div><hr /><h2>Define Documentation</h2>
<a class="anchor" id="a5cb259e0fd1a8c0c64fbc891bc273417"></a><!-- doxytag: member="logging.h::PP_DCHECK" ref="a5cb259e0fd1a8c0c64fbc891bc273417" args="(a)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define <a class="el" href="logging_8h.html#a5cb259e0fd1a8c0c64fbc891bc273417">PP_DCHECK</a></td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname">a</td><td>)</td>
<td>&#160;&#160;&#160;assert(a)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>This macro asserts that 'a' evaluates to true. </p>
<p>In debug mode, this macro will crash the program if the assertion evaluates to false. It (typically) has no effect in release mode. </p>
</div>
</div>
<a class="anchor" id="a1c536418e751c9bda850cd2bc919e0ca"></a><!-- doxytag: member="logging.h::PP_NOTREACHED" ref="a1c536418e751c9bda850cd2bc919e0ca" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define <a class="el" href="logging_8h.html#a1c536418e751c9bda850cd2bc919e0ca">PP_NOTREACHED</a></td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td>&#160;&#160;&#160;assert(false)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>This macro asserts false in debug builds. </p>
<p>It's used in code paths that you don't expect to execute.</p>
<p><b>Example:</b></p>
<div class="fragment"><pre class="fragment"> <span class="keywordflow">if</span> (!pointer) {
<span class="comment">// Pointer wasn&#39;t valid! This shouldn&#39;t happen.</span>
<a class="code" href="logging_8h.html#a1c536418e751c9bda850cd2bc919e0ca" title="This macro asserts false in debug builds.">PP_NOTREACHED</a>();
<span class="keywordflow">return</span>;
}
<span class="comment">// Do stuff to the pointer, since you know it&#39;s valid.</span>
pointer-&gt;DoSomething();
</pre></div>
</div>
</div>
</div><!-- contents -->
</div>
{{/partials.standard_nacl_api}}