亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? glib-error-reporting.html

?? 最新gtk中文資料集
?? HTML
?? 第 1 頁 / 共 3 頁
字號(hào):
  g_return_val_if_fail (err == NULL || *err == NULL, FALSE);  tmp_error = NULL;  sub_function_that_can_fail (&amp;tmp_error);  other_function_that_can_fail (&amp;tmp_error);  if (tmp_error != NULL)    {       g_propagate_error (err, tmp_error);       return FALSE;    }}</pre></div><p><code class="literal">tmp_error</code> should be checked immediately after<code class="function"><code class="function">sub_function_that_can_fail()</code></code>, and either cleared or propagated upward.  The ruleis: <span class="emphasis"><em>after each error, you must either handle the error, or return it to thecalling function</em></span>.  Note that passing <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for the error location is theequivalent of handling an error by always doing nothing about it. So thefollowing code is fine, assuming errors in <code class="function"><code class="function">sub_function_that_can_fail()</code></code> are notfatal to <code class="function"><code class="function">my_function_that_can_fail()</code></code>:</p><div class="informalexample"><pre class="programlisting">gbooleanmy_function_that_can_fail (GError **err){  GError *tmp_error;  g_return_val_if_fail (err == NULL || *err == NULL, FALSE);  sub_function_that_can_fail (NULL); /* ignore errors */  tmp_error = NULL;  other_function_that_can_fail (&amp;tmp_error);  if (tmp_error != NULL)    {       g_propagate_error (err, tmp_error);       return FALSE;    }}</pre></div><p></p><p>Note that passing <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for the error location <span class="emphasis"><em>ignores</em></span>errors; it's equivalent to <code class="literal">try { <code class="function">sub_function_that_can_fail()</code>; } catch(...) {}</code> in C++. It does <span class="emphasis"><em>not</em></span> mean to leave errorsunhandled; it means to handle them by doing nothing.</p><p>Error domains and codes are conventionally named as follows:</p><div class="itemizedlist"><ul type="disc"><li><p>The error domain is called <code class="literal">&lt;NAMESPACE&gt;_&lt;MODULE&gt;_ERROR</code>, for example<a class="link" href="glib-Spawning-Processes.html#G-SPAWN-ERROR:CAPS"><code class="literal">G_SPAWN_ERROR</code></a> or <a class="link" href="glib-Threads.html#G-THREAD-ERROR:CAPS"><code class="literal">G_THREAD_ERROR</code></a>:</p><div class="informalexample"><pre class="programlisting">#define G_SPAWN_ERROR g_spawn_error_quark ()GQuarkg_spawn_error_quark (void){  return g_quark_from_static_string ("g-spawn-error-quark");}</pre></div><p></p></li><li><p>The error codes are in an enumeration called <code class="literal">&lt;Namespace&gt;&lt;Module&gt;Error</code>; for example,<a class="link" href="glib-Threads.html#GThreadError"><span class="type">GThreadError</span></a> or <a class="link" href="glib-Spawning-Processes.html#GSpawnError"><span class="type">GSpawnError</span></a>.</p></li><li><p>Members of the error code enumeration are called <code class="literal">&lt;NAMESPACE&gt;_&lt;MODULE&gt;_ERROR_&lt;CODE&gt;</code>, for example <a class="link" href="glib-Spawning-Processes.html#G-SPAWN-ERROR-FORK:CAPS"><code class="literal">G_SPAWN_ERROR_FORK</code></a> or <a class="link" href="glib-Threads.html#G-THREAD-ERROR-AGAIN:CAPS"><code class="literal">G_THREAD_ERROR_AGAIN</code></a>. </p></li><li><p>If there's a "generic" or "unknown" error code for unrecoverable errors itdoesn't make sense to distinguish with specific codes, it should be called <code class="literal">&lt;NAMESPACE&gt;_&lt;MODULE&gt;_ERROR_FAILED</code>, for example <a class="link" href="glib-Spawning-Processes.html#G-SPAWN-ERROR-FAILED:CAPS"><code class="literal">G_SPAWN_ERROR_FAILED</code></a> or <code class="literal">G_THREAD_ERROR_FAILED</code>.</p></li></ul></div><p></p><p>Summary of rules for use of <span class="type">""</span>      </p><div class="itemizedlist"><ul type="disc"><li><p>           Do not report programming errors via <a class="link" href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>.	  </p></li><li><p>          The last argument of a function that returns an error should be a          location where a <a class="link" href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a> can be placed (i.e. "<a class="link" href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>** error").  If          <a class="link" href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a> is used with varargs, the <a class="link" href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>** should be the last          argument before the "...".        </p></li><li><p>          The caller may pass <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for the <a class="link" href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>** if they are not interested          in details of the exact error that occurred.        </p></li><li><p>           If <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is passed for the <a class="link" href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>** argument, then errors should            not be returned to the caller, but your function should still            abort and return if an error occurs. That is, control flow should           not be affected by whether the caller wants to get a <a class="link" href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>.	  </p></li><li><p>          If a <a class="link" href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a> is reported, then your function by definition            <span class="emphasis"><em>had a fatal failure and did not complete whatever it was supposed            to do</em></span>. If the failure was not fatal, then you handled it          and you should not report it. If it was fatal, then you must report it           and discontinue whatever you were doing immediately.        </p></li><li><p>          A <a class="link" href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>* must be initialized to <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> before passing its address to          a function that can report errors.	  </p></li><li><p>          "Piling up" errors is always a bug. That is, if you assign a new          <a class="link" href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a> to a <a class="link" href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>* that is non-<a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, thus overwriting the previous          error, it indicates that you should have aborted the operation instead          of continuing. If you were able to continue, you should have cleared          the previous error with <a class="link" href="glib-Error-Reporting.html#g-clear-error"><code class="function">g_clear_error()</code></a>. <a class="link" href="glib-Error-Reporting.html#g-set-error"><code class="function">g_set_error()</code></a> will complain          if you pile up errors.	  </p></li><li><p>          By convention, if you return a boolean value indicating success           then <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> means success and <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> means failure. If <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is returned,          the error <span class="emphasis"><em>must</em></span> be set to a non-<a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> value.         </p></li><li><p>          A <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> return value is also frequently used to mean that an error          occurred.  You should make clear in your documentation whether <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is          a valid return value in non-error cases; if <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is a valid value,          then users must check whether an error was returned to see if the          function succeeded.	  </p></li><li><p>          When implementing a function that can report errors, you may want to          add a check at the top of your function that the error return location          is either <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> or contains a <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> error          (e.g. <code class="literal">g_return_if_fail (error == NULL || *error ==          NULL);</code>).	  </p></li></ul></div><p></p></div><div class="refsect1" lang="en"><a name="id2948572"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id2948582"></a><h3><a name="GError"></a>GError</h3><a class="indexterm" name="id2948595"></a><pre class="programlisting">typedef struct {  GQuark       domain;  gint         code;  gchar       *message;} GError;</pre><p>The <span class="structname">GError</span> structure contains information about an error that has occurred.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><a class="link" href="glib-Quarks.html#GQuark">GQuark</a>&#160;<em class="structfield"><code>domain</code></em>;</span></p></td><td>error domain, e.g. <a class="link" href="glib-File-Utilities.html#G-FILE-ERROR:CAPS"><span class="type">G_FILE_ERROR</span></a>.</td></tr><tr><td><p><span class="term"><a class="link" href="glib-Basic-Types.html#gint">gint</a>&#160;<em class="structfield"><code>code</code></em>;</span></p></td><td>error code, e.g. <a class="link" href="glib-File-Utilities.html#G-FILE-ERROR-NOENT:CAPS"><code class="literal">G_FILE_ERROR_NOENT</code></a>.</td></tr><tr><td><p><span class="term"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>&#160;*<em class="structfield"><code>message</code></em>;</span></p></td><td>human-readable informative error message.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2948703"></a><h3><a name="g-error-new"></a>g_error_new ()</h3><a class="indexterm" name="id2948715"></a><pre class="programlisting"><a class="link" href="glib-Error-Reporting.html#GError">GError</a>*             g_error_new                         (<a class="link" href="glib-Quarks.html#GQuark">GQuark</a> domain,                                                         <a class="link" href="glib-Basic-Types.html#gint">gint</a> code,                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *format,                                                         ...);</pre><p>Creates a new <a class="link" href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a> with the given <em class="parameter"><code>domain</code></em> and <em class="parameter"><code>code</code></em>,and a message formatted with <em class="parameter"><code>format</code></em>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>domain</code></em>&#160;:</span></p></td><td> error domain </td></tr><tr><td><p><span class="term"><em class="parameter"><code>code</code></em>&#160;:</span></p></td><td> error code</td></tr><tr><td><p><span class="term"><em class="parameter"><code>format</code></em>&#160;:</span></p></td><td> <code class="function">printf()</code>-style format for error message</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em>&#160;:</span></p></td><td> parameters for message format</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> a new <a class="link" href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2948878"></a><h3><a name="g-error-new-literal"></a>g_error_new_literal ()</h3><a class="indexterm" name="id2948891"></a><pre class="programlisting"><a class="link" href="glib-Error-Reporting.html#GError">GError</a>*             g_error_new_literal                 (<a class="link" href="glib-Quarks.html#GQuark">GQuark</a> domain,                                                         <a class="link" href="glib-Basic-Types.html#gint">gint</a> code,                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *message);</pre><p>Creates a new <a class="link" href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>; unlike <a class="link" href="glib-Error-Reporting.html#g-error-new"><code class="function">g_error_new()</code></a>, <em class="parameter"><code>message</code></em> is nota <code class="function">printf()</code>-style format string. Use this function if <em class="parameter"><code>message</code></em> contains text you don't have control over, that could include <code class="function">printf()</code> escape sequences.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>domain</code></em>&#160;:</span></p></td><td> error domain</td></tr><tr><td><p><span class="term"><em class="parameter"><code>code</code></em>&#160;:</span></p></td><td> error code</td></tr><tr><td><p><span class="term"><em class="parameter"><code>message</code></em>&#160;:</span></p></td><td> error message</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> a new <a class="link" href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a></td></tr></tbody></table></div></div>

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
51精品视频一区二区三区| 欧美一区二区精品在线| 日韩av二区在线播放| 欧美国产日产图区| 宅男在线国产精品| 色八戒一区二区三区| 国产精品一区二区三区四区| 一区二区三区影院| 国产精品色哟哟| 精品国精品国产| 欧美日本一道本在线视频| 波多野结衣亚洲| 国产一区二区视频在线| 麻豆91精品91久久久的内涵| 一区二区三区在线观看欧美| 国产精品久久久久一区| 日本一区二区三区四区在线视频 | 久久aⅴ国产欧美74aaa| 亚洲一区影音先锋| 自拍偷拍亚洲综合| 国产精品欧美极品| 欧美精彩视频一区二区三区| 精品日韩一区二区三区免费视频| 6080yy午夜一二三区久久| 欧美中文一区二区三区| 蜜臀av性久久久久av蜜臀妖精| 国产精品久久久久久户外露出| 久久久精品中文字幕麻豆发布| 欧美一区二区视频在线观看| 欧美日韩一本到| 欧美色综合网站| 欧美日韩专区在线| 欧美日韩一区不卡| 欧美午夜精品一区| 欧美日韩一区二区在线观看| 欧美性淫爽ww久久久久无| 在线免费观看一区| 欧美性受xxxx| 欧美高清一级片在线| 欧美日韩一区三区| 欧美一区二区成人| 91精品国产色综合久久| 欧美一区二区三区在线看| 欧美一区二区三区男人的天堂| 3d成人h动漫网站入口| 欧美夫妻性生活| 91精品国产高清一区二区三区蜜臀 | 日韩片之四级片| 欧美刺激脚交jootjob| 日韩欧美久久一区| 国产婷婷精品av在线| 国产精品美女一区二区在线观看| 国产精品色在线观看| 亚洲黄色在线视频| 日本不卡视频一二三区| 九色|91porny| 国产ts人妖一区二区| 成人福利视频网站| 色综合久久中文字幕综合网| 欧美三级韩国三级日本一级| 日韩三级视频在线看| 欧美激情在线看| 亚洲情趣在线观看| 秋霞国产午夜精品免费视频| 国产一级精品在线| caoporn国产一区二区| 欧美美女一区二区三区| 精品处破学生在线二十三| 一区视频在线播放| 一区二区三区高清在线| 蜜臀a∨国产成人精品| 成人精品免费网站| 欧美色区777第一页| 久久久久久久久久久黄色| 国产精品久久久久影院亚瑟| 污片在线观看一区二区| 国产一区二区精品久久99| 一本色道综合亚洲| 精品国偷自产国产一区| 亚洲欧美日韩电影| 精品中文字幕一区二区小辣椒| 丁香婷婷综合色啪| 欧美色综合久久| 久久久美女艺术照精彩视频福利播放| 亚洲精品日韩一| 韩国欧美一区二区| 欧美性感一类影片在线播放| 国产网站一区二区三区| 性做久久久久久久免费看| 国产jizzjizz一区二区| 91麻豆精品国产自产在线| 中文字幕在线一区| 麻豆视频观看网址久久| 91福利在线观看| 中文字幕高清不卡| 免费成人结看片| 91九色02白丝porn| 国产人伦精品一区二区| 美女脱光内衣内裤视频久久影院| 97久久超碰国产精品| 精品国产一区二区三区av性色| 亚洲在线中文字幕| 波多野结衣亚洲| 久久久久久久网| 久久精品99国产精品日本| 在线观看91精品国产入口| 国产精品美女久久久久aⅴ| 久久爱www久久做| 欧美日韩免费高清一区色橹橹| 国产精品丝袜91| 国产九色精品成人porny | 久久精品亚洲一区二区三区浴池| 午夜激情一区二区三区| 91国产丝袜在线播放| 中文字幕一区二区三| 国产盗摄视频一区二区三区| 日韩视频一区二区三区在线播放| 无码av中文一区二区三区桃花岛| 色综合久久中文综合久久97| 中文字幕乱码亚洲精品一区| 国产成人av福利| 久久久精品黄色| 国产成人日日夜夜| 日本一区二区免费在线| 国产精品一区二区久激情瑜伽| www激情久久| 寂寞少妇一区二区三区| 日韩女优毛片在线| 狠狠狠色丁香婷婷综合久久五月| 日韩女优制服丝袜电影| 精品一区二区三区视频在线观看| 91精品国产综合久久蜜臀| 亚洲成人午夜影院| 88在线观看91蜜桃国自产| 亚洲国产精品久久久男人的天堂| 在线观看日韩电影| 亚洲最新视频在线观看| 欧美亚洲图片小说| 午夜成人免费视频| 日韩一区二区三区电影| 老司机精品视频线观看86| 日韩精品专区在线影院重磅| 韩国三级中文字幕hd久久精品| 亚洲精品在线一区二区| 懂色av一区二区三区蜜臀 | 久久成人麻豆午夜电影| 日韩欧美国产一区二区在线播放| 精品伊人久久久久7777人| 久久久久久久免费视频了| 成人精品鲁一区一区二区| 亚洲欧洲www| 欧美性感一类影片在线播放| 亚洲18影院在线观看| 日韩免费一区二区| 成人免费看黄yyy456| 一区二区三区精品| 91精品国产入口| 国产激情精品久久久第一区二区| 国产农村妇女精品| 日本乱码高清不卡字幕| 日本午夜精品视频在线观看| 精品99一区二区| 色综合久久综合网97色综合 | 极品美女销魂一区二区三区| 国产欧美视频一区二区| 色婷婷激情一区二区三区| 婷婷久久综合九色综合绿巨人| 欧美电视剧免费全集观看| 福利一区在线观看| 亚洲一区二区高清| 久久精品亚洲乱码伦伦中文| 91久久精品一区二区三| 激情五月婷婷综合网| 1024成人网| 欧美成人高清电影在线| 99久久婷婷国产综合精品| 午夜电影一区二区| 国产精品福利一区二区三区| 欧美日韩国产另类一区| 国产精品99久久久久久久女警| 亚洲国产日韩综合久久精品| 欧美成人精品高清在线播放| 色综合久久久久| 极品少妇一区二区| 亚洲风情在线资源站| 国产精品久久三| 精品国产91洋老外米糕| 91福利国产精品| 丁香网亚洲国际| 麻豆高清免费国产一区| 亚洲一区国产视频| 国产精品毛片无遮挡高清| 91精品久久久久久久久99蜜臂| 成人精品免费看| 精品一区二区综合| 天天综合网天天综合色| 亚洲色图欧洲色图| 国产亚洲精品7777| 日韩一区二区精品在线观看| 91福利区一区二区三区|