⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cpl__error_8h.html

📁 gdal库的学习文档
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>OGR: cpl_error.h File Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"><link href="tabs.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.5.1 --><div class="tabs">  <ul>    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>    <li><a href="annotated.html"><span>Classes</span></a></li>    <li id="current"><a href="files.html"><span>Files</span></a></li>    <li><a href="dirs.html"><span>Directories</span></a></li>    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>  </ul></div><div class="tabs">  <ul>    <li><a href="files.html"><span>File&nbsp;List</span></a></li>    <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>  </ul></div><div class="nav"><a class="el" href="dir_efff706e5cd9dcba4fff01f296fe615e.html">port</a></div><h1>cpl_error.h File Reference</h1><code>#include &quot;<a class="el" href="cpl__port_8h-source.html">cpl_port.h</a>&quot;</code><br><p><a href="cpl__error_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr><tr><td colspan="2"><br><h2>Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__error_8h.html#ad2b98dd58e4de706a245faddac90403">CPLError</a> (CPLErr eErrClass, int err_no, const char *fmt,...)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__error_8h.html#29626fd8fdb658b19439beeb73a59560">CPLErrorReset</a> (void)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__error_8h.html#198afe56aced1d73226880aa90d39b99">CPLGetLastErrorNo</a> (void)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">CPLErr&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__error_8h.html#8df0d4e01034cf79202314c92251e920">CPLGetLastErrorType</a> (void)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__error_8h.html#7f71ade3bb0a0e9e45802975ec59ff5e">CPLGetLastErrorMsg</a> (void)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">CPLErrorHandler&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__error_8h.html#74d0e649d58180e621540bf73b58e4a2">CPLSetErrorHandler</a> (CPLErrorHandler)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__error_8h.html#d13c9c8f2037ddfd566c2a197f7b2537">CPLPushErrorHandler</a> (CPLErrorHandler)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__error_8h.html#c6c7c393c94b210e4be999f34fcb6680">CPLPopErrorHandler</a> (void)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__error_8h.html#d0c5d3481dd34c1f3a0f7775ebf74817">CPLDebug</a> (const char *, const char *,...)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__error_8h.html#b032ae39a103f985abc8599d822c2630">_CPLAssert</a> (const char *, const char *, int)</td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>CPL error handling services. <hr><h2>Function Documentation</h2><a class="anchor" name="b032ae39a103f985abc8599d822c2630"></a><!-- doxytag: member="cpl_error.h::_CPLAssert" ref="b032ae39a103f985abc8599d822c2630" args="(const char *, const char *, int)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">void _CPLAssert           </td>          <td>(</td>          <td class="paramtype">const char *&nbsp;</td>          <td class="paramname"> <em>pszExpression</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">const char *&nbsp;</td>          <td class="paramname"> <em>pszFile</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">int&nbsp;</td>          <td class="paramname"> <em>iLine</em></td><td>&nbsp;</td>        </tr>        <tr>          <td></td>          <td>)</td>          <td></td><td></td><td width="100%"></td>        </tr>      </table></div><div class="memdoc"><p>Report failure of a logical assertion.<p>Applications would normally use the CPLAssert() macro which expands into code calling <a class="el" href="cpl__error_8h.html#b032ae39a103f985abc8599d822c2630">_CPLAssert()</a> only if the condition fails. <a class="el" href="cpl__error_8h.html#b032ae39a103f985abc8599d822c2630">_CPLAssert()</a> will generate a CE_Fatal error call to <a class="el" href="cpl__error_8h.html#ad2b98dd58e4de706a245faddac90403">CPLError()</a>, indicating the file name, and line number of the failed assertion, as well as containing the assertion itself.<p>There is no reason for application code to call <a class="el" href="cpl__error_8h.html#b032ae39a103f985abc8599d822c2630">_CPLAssert()</a> directly. </div></div><p><a class="anchor" name="d0c5d3481dd34c1f3a0f7775ebf74817"></a><!-- doxytag: member="cpl_error.h::CPLDebug" ref="d0c5d3481dd34c1f3a0f7775ebf74817" args="(const char *, const char *,...)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">void CPLDebug           </td>          <td>(</td>          <td class="paramtype">const char *&nbsp;</td>          <td class="paramname"> <em>pszCategory</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">const char *&nbsp;</td>          <td class="paramname"> <em>pszFormat</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">&nbsp;</td>          <td class="paramname"> <em>...</em></td><td>&nbsp;</td>        </tr>        <tr>          <td></td>          <td>)</td>          <td></td><td></td><td width="100%"></td>        </tr>      </table></div><div class="memdoc"><p>Display a debugging message.<p>The category argument is used in conjunction with the CPL_DEBUG environment variable to establish if the message should be displayed. If the CPL_DEBUG environment variable is not set, no debug messages are emitted (use CPLError(CE_Warning,...) to ensure messages are displayed). If CPL_DEBUG is set, but is an empty string or the word "ON" then all debug messages are shown. Otherwise only messages whose category appears somewhere within the CPL_DEBUG value are displayed (as determinted by strstr()).<p>Categories are usually an identifier for the subsystem producing the error. For instance "GDAL" might be used for the GDAL core, and "TIFF" for messages from the TIFF translator.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>pszCategory</em>&nbsp;</td><td>name of the debugging message category. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>pszFormat</em>&nbsp;</td><td>printf() style format string for message to display. Remaining arguments are assumed to be for format. </td></tr>  </table></dl></div></div><p><a class="anchor" name="ad2b98dd58e4de706a245faddac90403"></a><!-- doxytag: member="cpl_error.h::CPLError" ref="ad2b98dd58e4de706a245faddac90403" args="(CPLErr eErrClass, int err_no, const char *fmt,...)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">void CPLError           </td>          <td>(</td>          <td class="paramtype">CPLErr&nbsp;</td>          <td class="paramname"> <em>eErrClass</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">int&nbsp;</td>          <td class="paramname"> <em>err_no</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">const char *&nbsp;</td>          <td class="paramname"> <em>fmt</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">&nbsp;</td>          <td class="paramname"> <em>...</em></td><td>&nbsp;</td>        </tr>        <tr>          <td></td>          <td>)</td>          <td></td><td></td><td width="100%"></td>        </tr>      </table></div><div class="memdoc"><p>Report an error.<p>This function reports an error in a manner that can be hooked and reported appropriate by different applications.<p>The effect of this function can be altered by applications by installing a custom error handling using <a class="el" href="cpl__error_8h.html#74d0e649d58180e621540bf73b58e4a2">CPLSetErrorHandler()</a>.<p>The eErrClass argument can have the value CE_Warning indicating that the message is an informational warning, CE_Failure indicating that the action failed, but that normal recover mechanisms will be used or CE_Fatal meaning that a fatal error has occured, and that <a class="el" href="cpl__error_8h.html#ad2b98dd58e4de706a245faddac90403">CPLError()</a> should not return.<p>The default behaviour of <a class="el" href="cpl__error_8h.html#ad2b98dd58e4de706a245faddac90403">CPLError()</a> is to report errors to stderr, and to abort() after reporting a CE_Fatal error. It is expected that some applications will want to supress error reporting, and will want to install a C++ exception, or longjmp() approach to no local fatal error recovery.<p>Regardless of how application error handlers or the default error handler choose to handle an error, the error number, and message will be stored for recovery with <a class="el" href="cpl__error_8h.html#198afe56aced1d73226880aa90d39b99">CPLGetLastErrorNo()</a> and <a class="el" href="cpl__error_8h.html#7f71ade3bb0a0e9e45802975ec59ff5e">CPLGetLastErrorMsg()</a>.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>eErrClass</em>&nbsp;</td><td>one of CE_Warning, CE_Failure or CE_Fatal. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>err_no</em>&nbsp;</td><td>the error number (CPLE_*) from <a class="el" href="cpl__error_8h.html">cpl_error.h</a>. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>fmt</em>&nbsp;</td><td>a printf() style format string. Any additional arguments will be treated as arguments to fill in this format in a manner similar to printf(). </td></tr>  </table></dl>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -