/usr/share/proton-0.14.0/docs/api-c/error_8h_source.html is in libqpid-proton8-dev-doc 0.14.0-5.1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>proton: /build/qpid-proton-4llz2H/qpid-proton-0.14.0/proton-c/include/proton/error.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">proton
 <span id="projectnumber">0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_3d7fee5163f29235853f3037db69c226.html">proton-c</a></li><li class="navelem"><a class="el" href="dir_ca4610195e991eb8124aba7312da0967.html">include</a></li><li class="navelem"><a class="el" href="dir_819e9c3ec552076ba9984156db77a62b.html">proton</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">error.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="error_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="preprocessor">#ifndef PROTON_ERROR_H</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="preprocessor">#define PROTON_ERROR_H 1</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> </div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">/*</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> *</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * Licensed to the Apache Software Foundation (ASF) under one</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * or more contributor license agreements. See the NOTICE file</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * distributed with this work for additional information</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * regarding copyright ownership. The ASF licenses this file</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * to you under the Apache License, Version 2.0 (the</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * "License"); you may not use this file except in compliance</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> * with the License. You may obtain a copy of the License at</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> *</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> *</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * Unless required by applicable law or agreed to in writing,</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> * software distributed under the License is distributed on an</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> * KIND, either express or implied. See the License for the</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> * specific language governing permissions and limitations</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> * under the License.</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"> *</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> */</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> </div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#include <<a class="code" href="import__export_8h.html">proton/import_export.h</a>></span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include <stdarg.h></span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> </div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="keyword">extern</span> <span class="stringliteral">"C"</span> {</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="comment"></span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="comment">/** A pn_error_t has an int error `code` and some string `text` to describe the error */</span></div><div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="error_8h.html#a24a289d5b32c9bd8a775600a5af83d52"> 33</a></span> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="error_8h.html#a24a289d5b32c9bd8a775600a5af83d52">pn_error_t</a> <a class="code" href="error_8h.html#a24a289d5b32c9bd8a775600a5af83d52">pn_error_t</a>;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> </div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="error_8h.html#ac73fbd2363c5f562f85dde459e631394"> 35</a></span> <span class="preprocessor">#define PN_OK (0)</span></div><div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="error_8h.html#a9e0f51b097f94293cdbbdeb5422a27a3"> 36</a></span> <span class="preprocessor">#define PN_EOS (-1)</span></div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="error_8h.html#a664f7bdd616c30b72bd50bcc17839c81"> 37</a></span> <span class="preprocessor">#define PN_ERR (-2)</span></div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="error_8h.html#aaeef136648e1fd51c2b56c0265fa86f7"> 38</a></span> <span class="preprocessor">#define PN_OVERFLOW (-3)</span></div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="error_8h.html#a3317339fb405435df42fa93d62f0e14c"> 39</a></span> <span class="preprocessor">#define PN_UNDERFLOW (-4)</span></div><div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="error_8h.html#a5efbe6093556326613d2ccd3864a00aa"> 40</a></span> <span class="preprocessor">#define PN_STATE_ERR (-5)</span></div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="error_8h.html#a5551b7172de89dc540bd7c2beedd325a"> 41</a></span> <span class="preprocessor">#define PN_ARG_ERR (-6)</span></div><div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="error_8h.html#a8bcf4aa6de1a6530713839bcae97d4a2"> 42</a></span> <span class="preprocessor">#define PN_TIMEOUT (-7)</span></div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="error_8h.html#a53284958be0c328f90ca3a4a0793d965"> 43</a></span> <span class="preprocessor">#define PN_INTR (-8)</span></div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="error_8h.html#afbb090366e9dbf9a5bb0735df1e23d33"> 44</a></span> <span class="preprocessor">#define PN_INPROGRESS (-9)</span></div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="error_8h.html#ab1f773ca03b0953de6ce3caf4c795b8d"> 45</a></span> <span class="preprocessor">#define PN_OUT_OF_MEMORY (-10)</span></div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="comment"></span></div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <span class="comment">/** @return name of the error code. Returned pointer is to a static constant, do not delete.*/</span></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span> <a class="code" href="import__export_8h.html#acfa9628d87130a64f95ee17c57a7c13b">PN_EXTERN</a> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="error_8h.html#aee4222d914d4435cfb1176641b23a749">pn_code</a>(<span class="keywordtype">int</span> code);</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> </div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <a class="code" href="import__export_8h.html#acfa9628d87130a64f95ee17c57a7c13b">PN_EXTERN</a> <a class="code" href="error_8h.html#a24a289d5b32c9bd8a775600a5af83d52">pn_error_t</a> *<a class="code" href="error_8h.html#a104978c6df0e32a92bda6fb75677f474">pn_error</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <a class="code" href="import__export_8h.html#acfa9628d87130a64f95ee17c57a7c13b">PN_EXTERN</a> <span class="keywordtype">void</span> <a class="code" href="error_8h.html#a0d17383b8e75c886eb717d9fa59b8629">pn_error_free</a>(<a class="code" href="error_8h.html#a24a289d5b32c9bd8a775600a5af83d52">pn_error_t</a> *error);</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> <span class="comment"></span></div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span> <span class="comment">/** Reset the error to a "no error" state with code == 0. */</span></div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <a class="code" href="import__export_8h.html#acfa9628d87130a64f95ee17c57a7c13b">PN_EXTERN</a> <span class="keywordtype">void</span> <a class="code" href="error_8h.html#a573a251879f9a3660270dbb494ecf0c5">pn_error_clear</a>(<a class="code" href="error_8h.html#a24a289d5b32c9bd8a775600a5af83d52">pn_error_t</a> *error);</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <span class="comment"></span></div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span> <span class="comment">/** Set the error code and text. Makes a copy of text. */</span></div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span> <a class="code" href="import__export_8h.html#acfa9628d87130a64f95ee17c57a7c13b">PN_EXTERN</a> <span class="keywordtype">int</span> <a class="code" href="error_8h.html#a8b4045ce1cd54a6069efc3add9318db5">pn_error_set</a>(<a class="code" href="error_8h.html#a24a289d5b32c9bd8a775600a5af83d52">pn_error_t</a> *error, <span class="keywordtype">int</span> code, <span class="keyword">const</span> <span class="keywordtype">char</span> *text);</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span> <span class="comment"></span></div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> <span class="comment">/** Set the code and set the text using a printf-style formatted string. */</span></div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span> <a class="code" href="import__export_8h.html#acfa9628d87130a64f95ee17c57a7c13b">PN_EXTERN</a> <span class="keywordtype">int</span> <a class="code" href="error_8h.html#a89548445746ea259742da3c6184f9f4b">pn_error_vformat</a>(<a class="code" href="error_8h.html#a24a289d5b32c9bd8a775600a5af83d52">pn_error_t</a> *error, <span class="keywordtype">int</span> code, <span class="keyword">const</span> <span class="keywordtype">char</span> *fmt, va_list ap);</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span> <span class="comment"></span></div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span> <span class="comment">/** Set the code and set the text using a printf-style formatted string. */</span></div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span> <a class="code" href="import__export_8h.html#acfa9628d87130a64f95ee17c57a7c13b">PN_EXTERN</a> <span class="keywordtype">int</span> <a class="code" href="error_8h.html#a1f0f10c8153b73e310360b491a3e1dcb">pn_error_format</a>(<a class="code" href="error_8h.html#a24a289d5b32c9bd8a775600a5af83d52">pn_error_t</a> *error, <span class="keywordtype">int</span> code, <span class="keyword">const</span> <span class="keywordtype">char</span> *fmt, ...);</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span> <span class="comment"></span></div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span> <span class="comment">/** @return the error code. */</span></div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span> <a class="code" href="import__export_8h.html#acfa9628d87130a64f95ee17c57a7c13b">PN_EXTERN</a> <span class="keywordtype">int</span> <a class="code" href="error_8h.html#a89187506c5fa352c6654506bf6123512">pn_error_code</a>(<a class="code" href="error_8h.html#a24a289d5b32c9bd8a775600a5af83d52">pn_error_t</a> *error);</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span> <span class="comment"></span></div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span> <span class="comment">/** @return the error text. Returned pointer is owned by the pn_error_t. */</span></div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span> <a class="code" href="import__export_8h.html#acfa9628d87130a64f95ee17c57a7c13b">PN_EXTERN</a> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="error_8h.html#acb884c8052bedf8b20c7b463bea9820a">pn_error_text</a>(<a class="code" href="error_8h.html#a24a289d5b32c9bd8a775600a5af83d52">pn_error_t</a> *error);</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span> </div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span> <a class="code" href="import__export_8h.html#acfa9628d87130a64f95ee17c57a7c13b">PN_EXTERN</a> <span class="keywordtype">int</span> <a class="code" href="error_8h.html#acaf10813854cc32128ca97607a614e43">pn_error_copy</a>(<a class="code" href="error_8h.html#a24a289d5b32c9bd8a775600a5af83d52">pn_error_t</a> *error, <a class="code" href="error_8h.html#a24a289d5b32c9bd8a775600a5af83d52">pn_error_t</a> *src);</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span> </div><div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="error_8h.html#aaa5af7c446f7e52a73684217906bc17e"> 73</a></span> <span class="preprocessor">#define PN_RETURN_IF_ERROR(x) \</span></div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span> <span class="preprocessor">do {\</span></div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span> <span class="preprocessor">int r = (x);\</span></div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span> <span class="preprocessor">if (r < 0) return r; \</span></div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span> <span class="preprocessor">} while (0)</span></div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span> </div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span> <span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span> }</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span> </div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span> <span class="preprocessor">#endif </span><span class="comment">/* error.h */</span><span class="preprocessor"></span></div><div class="ttc" id="error_8h_html_a573a251879f9a3660270dbb494ecf0c5"><div class="ttname"><a href="error_8h.html#a573a251879f9a3660270dbb494ecf0c5">pn_error_clear</a></div><div class="ttdeci">PN_EXTERN void pn_error_clear(pn_error_t *error)</div><div class="ttdoc">Reset the error to a "no error" state with code == 0. </div></div>
<div class="ttc" id="import__export_8h_html"><div class="ttname"><a href="import__export_8h.html">import_export.h</a></div></div>
<div class="ttc" id="error_8h_html_a89548445746ea259742da3c6184f9f4b"><div class="ttname"><a href="error_8h.html#a89548445746ea259742da3c6184f9f4b">pn_error_vformat</a></div><div class="ttdeci">PN_EXTERN int pn_error_vformat(pn_error_t *error, int code, const char *fmt, va_list ap)</div><div class="ttdoc">Set the code and set the text using a printf-style formatted string. </div></div>
<div class="ttc" id="error_8h_html_a89187506c5fa352c6654506bf6123512"><div class="ttname"><a href="error_8h.html#a89187506c5fa352c6654506bf6123512">pn_error_code</a></div><div class="ttdeci">PN_EXTERN int pn_error_code(pn_error_t *error)</div></div>
<div class="ttc" id="import__export_8h_html_acfa9628d87130a64f95ee17c57a7c13b"><div class="ttname"><a href="import__export_8h.html#acfa9628d87130a64f95ee17c57a7c13b">PN_EXTERN</a></div><div class="ttdeci">#define PN_EXTERN</div><div class="ttdef"><b>Definition:</b> import_export.h:53</div></div>
<div class="ttc" id="error_8h_html_a8b4045ce1cd54a6069efc3add9318db5"><div class="ttname"><a href="error_8h.html#a8b4045ce1cd54a6069efc3add9318db5">pn_error_set</a></div><div class="ttdeci">PN_EXTERN int pn_error_set(pn_error_t *error, int code, const char *text)</div><div class="ttdoc">Set the error code and text. </div></div>
<div class="ttc" id="error_8h_html_aee4222d914d4435cfb1176641b23a749"><div class="ttname"><a href="error_8h.html#aee4222d914d4435cfb1176641b23a749">pn_code</a></div><div class="ttdeci">PN_EXTERN const char * pn_code(int code)</div></div>
<div class="ttc" id="error_8h_html_a104978c6df0e32a92bda6fb75677f474"><div class="ttname"><a href="error_8h.html#a104978c6df0e32a92bda6fb75677f474">pn_error</a></div><div class="ttdeci">PN_EXTERN pn_error_t * pn_error(void)</div></div>
<div class="ttc" id="error_8h_html_acaf10813854cc32128ca97607a614e43"><div class="ttname"><a href="error_8h.html#acaf10813854cc32128ca97607a614e43">pn_error_copy</a></div><div class="ttdeci">PN_EXTERN int pn_error_copy(pn_error_t *error, pn_error_t *src)</div></div>
<div class="ttc" id="error_8h_html_a1f0f10c8153b73e310360b491a3e1dcb"><div class="ttname"><a href="error_8h.html#a1f0f10c8153b73e310360b491a3e1dcb">pn_error_format</a></div><div class="ttdeci">PN_EXTERN int pn_error_format(pn_error_t *error, int code, const char *fmt,...)</div><div class="ttdoc">Set the code and set the text using a printf-style formatted string. </div></div>
<div class="ttc" id="error_8h_html_a0d17383b8e75c886eb717d9fa59b8629"><div class="ttname"><a href="error_8h.html#a0d17383b8e75c886eb717d9fa59b8629">pn_error_free</a></div><div class="ttdeci">PN_EXTERN void pn_error_free(pn_error_t *error)</div></div>
<div class="ttc" id="error_8h_html_a24a289d5b32c9bd8a775600a5af83d52"><div class="ttname"><a href="error_8h.html#a24a289d5b32c9bd8a775600a5af83d52">pn_error_t</a></div><div class="ttdeci">struct pn_error_t pn_error_t</div><div class="ttdoc">A pn_error_t has an int error code and some string text to describe the error. </div><div class="ttdef"><b>Definition:</b> error.h:33</div></div>
<div class="ttc" id="error_8h_html_acb884c8052bedf8b20c7b463bea9820a"><div class="ttname"><a href="error_8h.html#acb884c8052bedf8b20c7b463bea9820a">pn_error_text</a></div><div class="ttdeci">PN_EXTERN const char * pn_error_text(pn_error_t *error)</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Feb 4 2018 22:16:50 for proton by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
|