mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-21 11:35:53 +00:00
deploy: 405f4613d8
This commit is contained in:
@@ -174,133 +174,134 @@ $(function() {
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932af301bbeaf5fcfb44db08132e6eae4ac2">rpcNOT_SYNCED</a>, <span class="stringliteral">"notSynced"</span>, <span class="stringliteral">"Not synced to the network."</span>, 503},</div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a02193610b83aaaae66347f6236dcf995">rpcNO_EVENTS</a>, <span class="stringliteral">"noEvents"</span>, <span class="stringliteral">"Current transport does not support events."</span>, 405},</div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a128bdc6241c00a1d4486399d304c2d28">rpcNO_NETWORK</a>, <span class="stringliteral">"noNetwork"</span>, <span class="stringliteral">"Not synced to the network."</span>, 503},</div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932af84f0f070938fb2e6bfc21dd28e98c5c">rpcNO_PERMISSION</a>, <span class="stringliteral">"noPermission"</span>, <span class="stringliteral">"You don't have permission for this command."</span>, 401},</div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932aaa66891292b88906637528756e064d1e">rpcNO_PF_REQUEST</a>, <span class="stringliteral">"noPathRequest"</span>, <span class="stringliteral">"No pathfinding request in progress."</span>, 404},</div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a6b62321701dd9bdac951e62cf9a478a5">rpcOBJECT_NOT_FOUND</a>, <span class="stringliteral">"objectNotFound"</span>, <span class="stringliteral">"The requested object was not found."</span>, 404},</div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a78e5ffef07cc85fedafde770039313bc">rpcPUBLIC_MALFORMED</a>, <span class="stringliteral">"publicMalformed"</span>, <span class="stringliteral">"Public key is malformed."</span>, 400},</div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a70a773ee3a341f5704835d3276b814a0">rpcSENDMAX_MALFORMED</a>, <span class="stringliteral">"sendMaxMalformed"</span>, <span class="stringliteral">"SendMax amount malformed."</span>, 400},</div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a9e3a3fa2bb1e04da92ea7253db9189d3">rpcSIGNING_MALFORMED</a>, <span class="stringliteral">"signingMalformed"</span>, <span class="stringliteral">"Signing of transaction is malformed."</span>, 400},</div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a55a275d2d3a5e83d075c30650592949d">rpcSLOW_DOWN</a>, <span class="stringliteral">"slowDown"</span>, <span class="stringliteral">"You are placing too much load on the server."</span>, 429},</div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a967859223f75630b2c78876fca0c0436">rpcSRC_ACT_MALFORMED</a>, <span class="stringliteral">"srcActMalformed"</span>, <span class="stringliteral">"Source account is malformed."</span>, 400},</div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932afff1867365ccf8f1661c8d796c93ef4c">rpcSRC_ACT_MISSING</a>, <span class="stringliteral">"srcActMissing"</span>, <span class="stringliteral">"Source account not provided."</span>, 400},</div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a45e21d134aa6921065916fcbcb875877">rpcSRC_ACT_NOT_FOUND</a>, <span class="stringliteral">"srcActNotFound"</span>, <span class="stringliteral">"Source account not found."</span>, 404},</div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932ad23b4971210983fe07f7225143e02225">rpcSRC_CUR_MALFORMED</a>, <span class="stringliteral">"srcCurMalformed"</span>, <span class="stringliteral">"Source currency is malformed."</span>, 400},</div>
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a9e0f3e460ea9530eb29736e0cd9b4304">rpcSRC_ISR_MALFORMED</a>, <span class="stringliteral">"srcIsrMalformed"</span>, <span class="stringliteral">"Source issuer is malformed."</span>, 400},</div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a8ea4e65eae406a522497b5a12dcde036">rpcSTREAM_MALFORMED</a>, <span class="stringliteral">"malformedStream"</span>, <span class="stringliteral">"Stream malformed."</span>, 400},</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a41779a85a65f6faeb648c960e77f388f">rpcTOO_BUSY</a>, <span class="stringliteral">"tooBusy"</span>, <span class="stringliteral">"The server is too busy to help you now."</span>, 503},</div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a34422dc324e558835f6b63c7f430729a">rpcTXN_NOT_FOUND</a>, <span class="stringliteral">"txnNotFound"</span>, <span class="stringliteral">"Transaction not found."</span>, 404},</div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a2e316006c45784996f1c36ff28ecf795">rpcUNKNOWN_COMMAND</a>, <span class="stringliteral">"unknownCmd"</span>, <span class="stringliteral">"Unknown method."</span>, 405},</div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a1a87d932a3aa4d8c546fa831ce6f3804">rpcORACLE_MALFORMED</a>, <span class="stringliteral">"oracleMalformed"</span>, <span class="stringliteral">"Oracle request is malformed."</span>, 400},</div>
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a81c43f54c2aae9c4e2263be5412a9e7e">rpcBAD_CREDENTIALS</a>, <span class="stringliteral">"badCredentials"</span>, <span class="stringliteral">"Credentials do not exist, are not accepted, or have expired."</span>, 400},</div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a4fa92eda2a5646cf19562903188f6417">rpcTX_SIGNED</a>, <span class="stringliteral">"transactionSigned"</span>, <span class="stringliteral">"Transaction should not be signed."</span>, 400}};</div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span><span class="comment">// clang-format on</span></div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> </div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span><span class="comment">// Sort and validate unorderedErrorInfos at compile time. Should be</span></div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span><span class="comment">// converted to consteval when get to C++20.</span></div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span><span class="keyword">template</span> <<span class="keywordtype">int</span> M, <span class="keywordtype">int</span> N></div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span><span class="keyword">constexpr</span> <span class="keyword">auto</span></div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC_1_1detail.html#ae8a277a8a38dcb1d28661036537336b4"> 124</a></span><a class="code hl_function" href="namespaceripple_1_1RPC_1_1detail.html#ae8a277a8a38dcb1d28661036537336b4">sortErrorInfos</a>(<a class="code hl_struct" href="structripple_1_1RPC_1_1ErrorInfo.html">ErrorInfo</a> <span class="keyword">const</span> (&unordered)[N]) -> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/container/array.html">std::array<ErrorInfo, M></a></div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span>{</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/container/array.html">std::array<ErrorInfo, M></a> ret = {};</div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> </div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <span class="keywordflow">for</span> (<a class="code hl_struct" href="structripple_1_1RPC_1_1ErrorInfo.html">ErrorInfo</a> <span class="keyword">const</span>& info : unordered)</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> {</div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <span class="keywordflow">if</span> (info.code <= <a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a6f69b339743d28bbc421fa3b31437173">rpcSUCCESS</a> || info.code > <a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a12405c5cf850257ddac293134371f64d">rpcLAST</a>)</div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <span class="keywordflow">throw</span>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/error/out_of_range.html">std::out_of_range</a>(<span class="stringliteral">"Invalid error_code_i"</span>));</div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> </div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <span class="comment">// The first valid code follows rpcSUCCESS immediately.</span></div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> <span class="keyword">static_assert</span>(<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a6f69b339743d28bbc421fa3b31437173">rpcSUCCESS</a> == 0, <span class="stringliteral">"Unexpected error_code_i layout."</span>);</div>
|
||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> <span class="keywordtype">int</span> <span class="keyword">const</span> index{info.code - 1};</div>
|
||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> </div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> <span class="keywordflow">if</span> (ret[index].code != <a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932aa4f3cb4313d397ba327dfc49ce439cae">rpcUNKNOWN</a>)</div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> <span class="keywordflow">throw</span>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/error/invalid_argument.html">std::invalid_argument</a>(<span class="stringliteral">"Duplicate error_code_i in list"</span>));</div>
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> </div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> ret[index] = info;</div>
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> }</div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> </div>
|
||||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> <span class="comment">// Verify that all entries are filled in starting with 1 and proceeding</span></div>
|
||||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> <span class="comment">// to rpcLAST.</span></div>
|
||||
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> <span class="comment">//</span></div>
|
||||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <span class="comment">// It's okay for there to be missing entries; they will contain the code</span></div>
|
||||
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <span class="comment">// rpcUNKNOWN. But other than that all entries should match their index.</span></div>
|
||||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> <span class="keywordtype">int</span> codeCount{0};</div>
|
||||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> <span class="keywordtype">int</span> expect{<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a89a147d7376535a497c85024dabc9167">rpcBAD_SYNTAX</a> - 1};</div>
|
||||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> <span class="keywordflow">for</span> (<a class="code hl_struct" href="structripple_1_1RPC_1_1ErrorInfo.html">ErrorInfo</a> <span class="keyword">const</span>& info : ret)</div>
|
||||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> {</div>
|
||||
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> ++expect;</div>
|
||||
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> <span class="keywordflow">if</span> (info.code == <a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932aa4f3cb4313d397ba327dfc49ce439cae">rpcUNKNOWN</a>)</div>
|
||||
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> <span class="keywordflow">continue</span>;</div>
|
||||
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> </div>
|
||||
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> <span class="keywordflow">if</span> (info.code != expect)</div>
|
||||
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> <span class="keywordflow">throw</span>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/error/invalid_argument.html">std::invalid_argument</a>(<span class="stringliteral">"Empty error_code_i in list"</span>));</div>
|
||||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> ++codeCount;</div>
|
||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> }</div>
|
||||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> <span class="keywordflow">if</span> (expect != <a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a12405c5cf850257ddac293134371f64d">rpcLAST</a>)</div>
|
||||
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> <span class="keywordflow">throw</span>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/error/invalid_argument.html">std::invalid_argument</a>(<span class="stringliteral">"Insufficient list entries"</span>));</div>
|
||||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> <span class="keywordflow">if</span> (codeCount != N)</div>
|
||||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> <span class="keywordflow">throw</span>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/error/invalid_argument.html">std::invalid_argument</a>(<span class="stringliteral">"Bad handling of unorderedErrorInfos"</span>));</div>
|
||||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> </div>
|
||||
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> <span class="keywordflow">return</span> ret;</div>
|
||||
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span>}</div>
|
||||
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> </div>
|
||||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC_1_1detail.html#aa702f450a33affe49c682659ea86ad90"> 168</a></span><span class="keyword">constexpr</span> <span class="keyword">auto</span> <a class="code hl_variable" href="namespaceripple_1_1RPC_1_1detail.html#aa702f450a33affe49c682659ea86ad90">sortedErrorInfos</a>{sortErrorInfos<rpcLAST>(<a class="code hl_variable" href="namespaceripple_1_1RPC_1_1detail.html#ae8de80620fff9de55ec0ddb5775c26b8">unorderedErrorInfos</a>)};</div>
|
||||
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> </div>
|
||||
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC_1_1detail.html#ac52c1b9c7196e379c9a838cde09592bb"> 170</a></span><span class="keyword">constexpr</span> <a class="code hl_struct" href="structripple_1_1RPC_1_1ErrorInfo.html">ErrorInfo</a> <a class="code hl_variable" href="namespaceripple_1_1RPC_1_1detail.html#ac52c1b9c7196e379c9a838cde09592bb">unknownError</a>;</div>
|
||||
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> </div>
|
||||
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span>} <span class="comment">// namespace detail</span></div>
|
||||
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> </div>
|
||||
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span><span class="comment">//------------------------------------------------------------------------------</span></div>
|
||||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> </div>
|
||||
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span><a class="code hl_struct" href="structripple_1_1RPC_1_1ErrorInfo.html">ErrorInfo</a> <span class="keyword">const</span>&</div>
|
||||
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC.html#aa01c09044342d3707e231b3ede5086f0"> 177</a></span><a class="code hl_function" href="namespaceripple_1_1RPC.html#aa01c09044342d3707e231b3ede5086f0">get_error_info</a>(<a class="code hl_enumeration" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932">error_code_i</a> code)</div>
|
||||
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span>{</div>
|
||||
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> <span class="keywordflow">if</span> (code <= rpcSUCCESS || code > <a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a12405c5cf850257ddac293134371f64d">rpcLAST</a>)</div>
|
||||
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> <span class="keywordflow">return</span> <a class="code hl_variable" href="namespaceripple_1_1RPC_1_1detail.html#ac52c1b9c7196e379c9a838cde09592bb">detail::unknownError</a>;</div>
|
||||
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> <span class="keywordflow">return</span> <a class="code hl_variable" href="namespaceripple_1_1RPC_1_1detail.html#aa702f450a33affe49c682659ea86ad90">detail::sortedErrorInfos</a>[code - 1];</div>
|
||||
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span>}</div>
|
||||
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> </div>
|
||||
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span><a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a></div>
|
||||
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC.html#a2cd6200f6709780fcf1dd26ec9cd2866"> 185</a></span><a class="code hl_function" href="namespaceripple_1_1RPC.html#a2cd6200f6709780fcf1dd26ec9cd2866">make_error</a>(<a class="code hl_enumeration" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932">error_code_i</a> code)</div>
|
||||
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span>{</div>
|
||||
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> <a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a> json;</div>
|
||||
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> <a class="code hl_function" href="namespaceripple_1_1RPC.html#a577bde9602a28f59e445c496f92a1ccf">inject_error</a>(code, json);</div>
|
||||
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> <span class="keywordflow">return</span> json;</div>
|
||||
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span>}</div>
|
||||
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> </div>
|
||||
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span><a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a></div>
|
||||
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC.html#a13f1f4cafeef7807d8e84fc1b4980079"> 193</a></span><a class="code hl_function" href="namespaceripple_1_1RPC.html#a2cd6200f6709780fcf1dd26ec9cd2866">make_error</a>(<a class="code hl_enumeration" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932">error_code_i</a> code, <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <span class="keyword">const</span>& message)</div>
|
||||
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span>{</div>
|
||||
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> <a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a> json;</div>
|
||||
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> <a class="code hl_function" href="namespaceripple_1_1RPC.html#a577bde9602a28f59e445c496f92a1ccf">inject_error</a>(code, message, json);</div>
|
||||
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> <span class="keywordflow">return</span> json;</div>
|
||||
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span>}</div>
|
||||
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> </div>
|
||||
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span><span class="keywordtype">bool</span></div>
|
||||
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC.html#a1a79f0c33d1405fe85c40d63a49658bd"> 201</a></span><a class="code hl_function" href="namespaceripple_1_1RPC.html#a1a79f0c33d1405fe85c40d63a49658bd">contains_error</a>(<a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a> <span class="keyword">const</span>& json)</div>
|
||||
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span>{</div>
|
||||
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> <span class="keywordflow">if</span> (json.<a class="code hl_function" href="classJson_1_1Value.html#a8cf96c0f2a552051fcfc78ffee60e037">isObject</a>() && json.<a class="code hl_function" href="classJson_1_1Value.html#ad6d4df2227321bab05e86667609a7fad">isMember</a>(jss::error))</div>
|
||||
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span>}</div>
|
||||
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> </div>
|
||||
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span><span class="keywordtype">int</span></div>
|
||||
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC.html#a73e0accbac78ba2dda7a2ba0f3889800"> 209</a></span><a class="code hl_function" href="namespaceripple_1_1RPC.html#a73e0accbac78ba2dda7a2ba0f3889800">error_code_http_status</a>(<a class="code hl_enumeration" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932">error_code_i</a> code)</div>
|
||||
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span>{</div>
|
||||
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceripple_1_1RPC.html#aa01c09044342d3707e231b3ede5086f0">get_error_info</a>(code).<a class="code hl_variable" href="structripple_1_1RPC_1_1ErrorInfo.html#a08285f5655ec9e56b914d8d699820a93">http_status</a>;</div>
|
||||
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span>}</div>
|
||||
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> </div>
|
||||
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span>} <span class="comment">// namespace RPC</span></div>
|
||||
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> </div>
|
||||
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span><a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div>
|
||||
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"><a class="line" href="namespaceripple.html#a23f02900cac703bddf91fff471cb9d65"> 217</a></span><a class="code hl_function" href="namespaceripple.html#a23f02900cac703bddf91fff471cb9d65">rpcErrorString</a>(<a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a> <span class="keyword">const</span>& jv)</div>
|
||||
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span>{</div>
|
||||
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> XRPL_ASSERT(</div>
|
||||
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> <a class="code hl_function" href="namespaceripple_1_1RPC.html#a1a79f0c33d1405fe85c40d63a49658bd">RPC::contains_error</a>(jv),</div>
|
||||
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> <span class="stringliteral">"ripple::RPC::rpcErrorString : input contains an error"</span>);</div>
|
||||
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> <span class="keywordflow">return</span> jv[jss::error].<a class="code hl_function" href="classJson_1_1Value.html#ab0d86bf425efefd03513e8dbfaca317b">asString</a>() + jv[jss::error_message].<a class="code hl_function" href="classJson_1_1Value.html#ab0d86bf425efefd03513e8dbfaca317b">asString</a>();</div>
|
||||
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span>}</div>
|
||||
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> </div>
|
||||
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span>} <span class="comment">// namespace ripple</span></div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932acf2bb4b677f2af23815cbd3727964880">rpcWRONG_NETWORK</a>, <span class="stringliteral">"wrongNetwork"</span>, <span class="stringliteral">"Wrong network."</span>, 503},</div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932af84f0f070938fb2e6bfc21dd28e98c5c">rpcNO_PERMISSION</a>, <span class="stringliteral">"noPermission"</span>, <span class="stringliteral">"You don't have permission for this command."</span>, 401},</div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932aaa66891292b88906637528756e064d1e">rpcNO_PF_REQUEST</a>, <span class="stringliteral">"noPathRequest"</span>, <span class="stringliteral">"No pathfinding request in progress."</span>, 404},</div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a6b62321701dd9bdac951e62cf9a478a5">rpcOBJECT_NOT_FOUND</a>, <span class="stringliteral">"objectNotFound"</span>, <span class="stringliteral">"The requested object was not found."</span>, 404},</div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a78e5ffef07cc85fedafde770039313bc">rpcPUBLIC_MALFORMED</a>, <span class="stringliteral">"publicMalformed"</span>, <span class="stringliteral">"Public key is malformed."</span>, 400},</div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a70a773ee3a341f5704835d3276b814a0">rpcSENDMAX_MALFORMED</a>, <span class="stringliteral">"sendMaxMalformed"</span>, <span class="stringliteral">"SendMax amount malformed."</span>, 400},</div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a9e3a3fa2bb1e04da92ea7253db9189d3">rpcSIGNING_MALFORMED</a>, <span class="stringliteral">"signingMalformed"</span>, <span class="stringliteral">"Signing of transaction is malformed."</span>, 400},</div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a55a275d2d3a5e83d075c30650592949d">rpcSLOW_DOWN</a>, <span class="stringliteral">"slowDown"</span>, <span class="stringliteral">"You are placing too much load on the server."</span>, 429},</div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a967859223f75630b2c78876fca0c0436">rpcSRC_ACT_MALFORMED</a>, <span class="stringliteral">"srcActMalformed"</span>, <span class="stringliteral">"Source account is malformed."</span>, 400},</div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932afff1867365ccf8f1661c8d796c93ef4c">rpcSRC_ACT_MISSING</a>, <span class="stringliteral">"srcActMissing"</span>, <span class="stringliteral">"Source account not provided."</span>, 400},</div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a45e21d134aa6921065916fcbcb875877">rpcSRC_ACT_NOT_FOUND</a>, <span class="stringliteral">"srcActNotFound"</span>, <span class="stringliteral">"Source account not found."</span>, 404},</div>
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932ad23b4971210983fe07f7225143e02225">rpcSRC_CUR_MALFORMED</a>, <span class="stringliteral">"srcCurMalformed"</span>, <span class="stringliteral">"Source currency is malformed."</span>, 400},</div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a9e0f3e460ea9530eb29736e0cd9b4304">rpcSRC_ISR_MALFORMED</a>, <span class="stringliteral">"srcIsrMalformed"</span>, <span class="stringliteral">"Source issuer is malformed."</span>, 400},</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a8ea4e65eae406a522497b5a12dcde036">rpcSTREAM_MALFORMED</a>, <span class="stringliteral">"malformedStream"</span>, <span class="stringliteral">"Stream malformed."</span>, 400},</div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a41779a85a65f6faeb648c960e77f388f">rpcTOO_BUSY</a>, <span class="stringliteral">"tooBusy"</span>, <span class="stringliteral">"The server is too busy to help you now."</span>, 503},</div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a34422dc324e558835f6b63c7f430729a">rpcTXN_NOT_FOUND</a>, <span class="stringliteral">"txnNotFound"</span>, <span class="stringliteral">"Transaction not found."</span>, 404},</div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a2e316006c45784996f1c36ff28ecf795">rpcUNKNOWN_COMMAND</a>, <span class="stringliteral">"unknownCmd"</span>, <span class="stringliteral">"Unknown method."</span>, 405},</div>
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a1a87d932a3aa4d8c546fa831ce6f3804">rpcORACLE_MALFORMED</a>, <span class="stringliteral">"oracleMalformed"</span>, <span class="stringliteral">"Oracle request is malformed."</span>, 400},</div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a81c43f54c2aae9c4e2263be5412a9e7e">rpcBAD_CREDENTIALS</a>, <span class="stringliteral">"badCredentials"</span>, <span class="stringliteral">"Credentials do not exist, are not accepted, or have expired."</span>, 400},</div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a4fa92eda2a5646cf19562903188f6417">rpcTX_SIGNED</a>, <span class="stringliteral">"transactionSigned"</span>, <span class="stringliteral">"Transaction should not be signed."</span>, 400}};</div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span><span class="comment">// clang-format on</span></div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> </div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span><span class="comment">// Sort and validate unorderedErrorInfos at compile time. Should be</span></div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span><span class="comment">// converted to consteval when get to C++20.</span></div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span><span class="keyword">template</span> <<span class="keywordtype">int</span> M, <span class="keywordtype">int</span> N></div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span><span class="keyword">constexpr</span> <span class="keyword">auto</span></div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC_1_1detail.html#ae8a277a8a38dcb1d28661036537336b4"> 125</a></span><a class="code hl_function" href="namespaceripple_1_1RPC_1_1detail.html#ae8a277a8a38dcb1d28661036537336b4">sortErrorInfos</a>(<a class="code hl_struct" href="structripple_1_1RPC_1_1ErrorInfo.html">ErrorInfo</a> <span class="keyword">const</span> (&unordered)[N]) -> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/container/array.html">std::array<ErrorInfo, M></a></div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span>{</div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/container/array.html">std::array<ErrorInfo, M></a> ret = {};</div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> </div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <span class="keywordflow">for</span> (<a class="code hl_struct" href="structripple_1_1RPC_1_1ErrorInfo.html">ErrorInfo</a> <span class="keyword">const</span>& info : unordered)</div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> {</div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <span class="keywordflow">if</span> (info.code <= <a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a6f69b339743d28bbc421fa3b31437173">rpcSUCCESS</a> || info.code > <a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a12405c5cf850257ddac293134371f64d">rpcLAST</a>)</div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <span class="keywordflow">throw</span>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/error/out_of_range.html">std::out_of_range</a>(<span class="stringliteral">"Invalid error_code_i"</span>));</div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> </div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> <span class="comment">// The first valid code follows rpcSUCCESS immediately.</span></div>
|
||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> <span class="keyword">static_assert</span>(<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a6f69b339743d28bbc421fa3b31437173">rpcSUCCESS</a> == 0, <span class="stringliteral">"Unexpected error_code_i layout."</span>);</div>
|
||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <span class="keywordtype">int</span> <span class="keyword">const</span> index{info.code - 1};</div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> </div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> <span class="keywordflow">if</span> (ret[index].code != <a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932aa4f3cb4313d397ba327dfc49ce439cae">rpcUNKNOWN</a>)</div>
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> <span class="keywordflow">throw</span>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/error/invalid_argument.html">std::invalid_argument</a>(<span class="stringliteral">"Duplicate error_code_i in list"</span>));</div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> </div>
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> ret[index] = info;</div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> }</div>
|
||||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> </div>
|
||||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> <span class="comment">// Verify that all entries are filled in starting with 1 and proceeding</span></div>
|
||||
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> <span class="comment">// to rpcLAST.</span></div>
|
||||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <span class="comment">//</span></div>
|
||||
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <span class="comment">// It's okay for there to be missing entries; they will contain the code</span></div>
|
||||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> <span class="comment">// rpcUNKNOWN. But other than that all entries should match their index.</span></div>
|
||||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> <span class="keywordtype">int</span> codeCount{0};</div>
|
||||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> <span class="keywordtype">int</span> expect{<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a89a147d7376535a497c85024dabc9167">rpcBAD_SYNTAX</a> - 1};</div>
|
||||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> <span class="keywordflow">for</span> (<a class="code hl_struct" href="structripple_1_1RPC_1_1ErrorInfo.html">ErrorInfo</a> <span class="keyword">const</span>& info : ret)</div>
|
||||
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> {</div>
|
||||
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> ++expect;</div>
|
||||
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> <span class="keywordflow">if</span> (info.code == <a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932aa4f3cb4313d397ba327dfc49ce439cae">rpcUNKNOWN</a>)</div>
|
||||
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> <span class="keywordflow">continue</span>;</div>
|
||||
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> </div>
|
||||
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> <span class="keywordflow">if</span> (info.code != expect)</div>
|
||||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <span class="keywordflow">throw</span>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/error/invalid_argument.html">std::invalid_argument</a>(<span class="stringliteral">"Empty error_code_i in list"</span>));</div>
|
||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> ++codeCount;</div>
|
||||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> }</div>
|
||||
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> <span class="keywordflow">if</span> (expect != <a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a12405c5cf850257ddac293134371f64d">rpcLAST</a>)</div>
|
||||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> <span class="keywordflow">throw</span>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/error/invalid_argument.html">std::invalid_argument</a>(<span class="stringliteral">"Insufficient list entries"</span>));</div>
|
||||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> <span class="keywordflow">if</span> (codeCount != N)</div>
|
||||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> <span class="keywordflow">throw</span>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/error/invalid_argument.html">std::invalid_argument</a>(<span class="stringliteral">"Bad handling of unorderedErrorInfos"</span>));</div>
|
||||
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> </div>
|
||||
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> <span class="keywordflow">return</span> ret;</div>
|
||||
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span>}</div>
|
||||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> </div>
|
||||
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC_1_1detail.html#aa702f450a33affe49c682659ea86ad90"> 169</a></span><span class="keyword">constexpr</span> <span class="keyword">auto</span> <a class="code hl_variable" href="namespaceripple_1_1RPC_1_1detail.html#aa702f450a33affe49c682659ea86ad90">sortedErrorInfos</a>{sortErrorInfos<rpcLAST>(<a class="code hl_variable" href="namespaceripple_1_1RPC_1_1detail.html#ae8de80620fff9de55ec0ddb5775c26b8">unorderedErrorInfos</a>)};</div>
|
||||
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> </div>
|
||||
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC_1_1detail.html#ac52c1b9c7196e379c9a838cde09592bb"> 171</a></span><span class="keyword">constexpr</span> <a class="code hl_struct" href="structripple_1_1RPC_1_1ErrorInfo.html">ErrorInfo</a> <a class="code hl_variable" href="namespaceripple_1_1RPC_1_1detail.html#ac52c1b9c7196e379c9a838cde09592bb">unknownError</a>;</div>
|
||||
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> </div>
|
||||
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span>} <span class="comment">// namespace detail</span></div>
|
||||
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> </div>
|
||||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span><span class="comment">//------------------------------------------------------------------------------</span></div>
|
||||
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> </div>
|
||||
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span><a class="code hl_struct" href="structripple_1_1RPC_1_1ErrorInfo.html">ErrorInfo</a> <span class="keyword">const</span>&</div>
|
||||
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC.html#aa01c09044342d3707e231b3ede5086f0"> 178</a></span><a class="code hl_function" href="namespaceripple_1_1RPC.html#aa01c09044342d3707e231b3ede5086f0">get_error_info</a>(<a class="code hl_enumeration" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932">error_code_i</a> code)</div>
|
||||
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span>{</div>
|
||||
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> <span class="keywordflow">if</span> (code <= rpcSUCCESS || code > <a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a12405c5cf850257ddac293134371f64d">rpcLAST</a>)</div>
|
||||
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> <span class="keywordflow">return</span> <a class="code hl_variable" href="namespaceripple_1_1RPC_1_1detail.html#ac52c1b9c7196e379c9a838cde09592bb">detail::unknownError</a>;</div>
|
||||
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> <span class="keywordflow">return</span> <a class="code hl_variable" href="namespaceripple_1_1RPC_1_1detail.html#aa702f450a33affe49c682659ea86ad90">detail::sortedErrorInfos</a>[code - 1];</div>
|
||||
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span>}</div>
|
||||
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> </div>
|
||||
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span><a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a></div>
|
||||
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC.html#a2cd6200f6709780fcf1dd26ec9cd2866"> 186</a></span><a class="code hl_function" href="namespaceripple_1_1RPC.html#a2cd6200f6709780fcf1dd26ec9cd2866">make_error</a>(<a class="code hl_enumeration" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932">error_code_i</a> code)</div>
|
||||
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span>{</div>
|
||||
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> <a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a> json;</div>
|
||||
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> <a class="code hl_function" href="namespaceripple_1_1RPC.html#a577bde9602a28f59e445c496f92a1ccf">inject_error</a>(code, json);</div>
|
||||
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> <span class="keywordflow">return</span> json;</div>
|
||||
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span>}</div>
|
||||
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> </div>
|
||||
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span><a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a></div>
|
||||
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC.html#a13f1f4cafeef7807d8e84fc1b4980079"> 194</a></span><a class="code hl_function" href="namespaceripple_1_1RPC.html#a2cd6200f6709780fcf1dd26ec9cd2866">make_error</a>(<a class="code hl_enumeration" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932">error_code_i</a> code, <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <span class="keyword">const</span>& message)</div>
|
||||
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span>{</div>
|
||||
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> <a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a> json;</div>
|
||||
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> <a class="code hl_function" href="namespaceripple_1_1RPC.html#a577bde9602a28f59e445c496f92a1ccf">inject_error</a>(code, message, json);</div>
|
||||
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> <span class="keywordflow">return</span> json;</div>
|
||||
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span>}</div>
|
||||
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> </div>
|
||||
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span><span class="keywordtype">bool</span></div>
|
||||
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC.html#a1a79f0c33d1405fe85c40d63a49658bd"> 202</a></span><a class="code hl_function" href="namespaceripple_1_1RPC.html#a1a79f0c33d1405fe85c40d63a49658bd">contains_error</a>(<a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a> <span class="keyword">const</span>& json)</div>
|
||||
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span>{</div>
|
||||
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> <span class="keywordflow">if</span> (json.<a class="code hl_function" href="classJson_1_1Value.html#a8cf96c0f2a552051fcfc78ffee60e037">isObject</a>() && json.<a class="code hl_function" href="classJson_1_1Value.html#ad6d4df2227321bab05e86667609a7fad">isMember</a>(jss::error))</div>
|
||||
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span>}</div>
|
||||
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> </div>
|
||||
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span><span class="keywordtype">int</span></div>
|
||||
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC.html#a73e0accbac78ba2dda7a2ba0f3889800"> 210</a></span><a class="code hl_function" href="namespaceripple_1_1RPC.html#a73e0accbac78ba2dda7a2ba0f3889800">error_code_http_status</a>(<a class="code hl_enumeration" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932">error_code_i</a> code)</div>
|
||||
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span>{</div>
|
||||
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceripple_1_1RPC.html#aa01c09044342d3707e231b3ede5086f0">get_error_info</a>(code).<a class="code hl_variable" href="structripple_1_1RPC_1_1ErrorInfo.html#a08285f5655ec9e56b914d8d699820a93">http_status</a>;</div>
|
||||
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span>}</div>
|
||||
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> </div>
|
||||
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span>} <span class="comment">// namespace RPC</span></div>
|
||||
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span> </div>
|
||||
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span><a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div>
|
||||
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"><a class="line" href="namespaceripple.html#a23f02900cac703bddf91fff471cb9d65"> 218</a></span><a class="code hl_function" href="namespaceripple.html#a23f02900cac703bddf91fff471cb9d65">rpcErrorString</a>(<a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a> <span class="keyword">const</span>& jv)</div>
|
||||
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span>{</div>
|
||||
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> XRPL_ASSERT(</div>
|
||||
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> <a class="code hl_function" href="namespaceripple_1_1RPC.html#a1a79f0c33d1405fe85c40d63a49658bd">RPC::contains_error</a>(jv),</div>
|
||||
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> <span class="stringliteral">"ripple::RPC::rpcErrorString : input contains an error"</span>);</div>
|
||||
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span> <span class="keywordflow">return</span> jv[jss::error].<a class="code hl_function" href="classJson_1_1Value.html#ab0d86bf425efefd03513e8dbfaca317b">asString</a>() + jv[jss::error_message].<a class="code hl_function" href="classJson_1_1Value.html#ab0d86bf425efefd03513e8dbfaca317b">asString</a>();</div>
|
||||
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span>}</div>
|
||||
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> </div>
|
||||
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span>} <span class="comment">// namespace ripple</span></div>
|
||||
<div class="ttc" id="aarray_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/header/array.html">array</a></div></div>
|
||||
<div class="ttc" id="abasic_string_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div></div>
|
||||
<div class="ttc" id="aclassJson_1_1Value_html"><div class="ttname"><a href="classJson_1_1Value.html">Json::Value</a></div><div class="ttdoc">Represents a JSON value.</div><div class="ttdef"><b>Definition:</b> <a href="json__value_8h_source.html#l00147">json_value.h:148</a></div></div>
|
||||
@@ -308,17 +309,17 @@ $(function() {
|
||||
<div class="ttc" id="aclassJson_1_1Value_html_ab0d86bf425efefd03513e8dbfaca317b"><div class="ttname"><a href="classJson_1_1Value.html#ab0d86bf425efefd03513e8dbfaca317b">Json::Value::asString</a></div><div class="ttdeci">std::string asString() const</div><div class="ttdoc">Returns the unquoted string value.</div><div class="ttdef"><b>Definition:</b> <a href="json__value_8cpp_source.html#l00475">json_value.cpp:475</a></div></div>
|
||||
<div class="ttc" id="aclassJson_1_1Value_html_ad6d4df2227321bab05e86667609a7fad"><div class="ttname"><a href="classJson_1_1Value.html#ad6d4df2227321bab05e86667609a7fad">Json::Value::isMember</a></div><div class="ttdeci">bool isMember(const char *key) const</div><div class="ttdoc">Return true if the object has a member named key.</div><div class="ttdef"><b>Definition:</b> <a href="json__value_8cpp_source.html#l00949">json_value.cpp:949</a></div></div>
|
||||
<div class="ttc" id="ainvalid_argument_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/error/invalid_argument.html">std::invalid_argument</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1RPC_1_1detail_html_aa702f450a33affe49c682659ea86ad90"><div class="ttname"><a href="namespaceripple_1_1RPC_1_1detail.html#aa702f450a33affe49c682659ea86ad90">ripple::RPC::detail::sortedErrorInfos</a></div><div class="ttdeci">constexpr auto sortedErrorInfos</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00168">ErrorCodes.cpp:168</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1RPC_1_1detail_html_ac52c1b9c7196e379c9a838cde09592bb"><div class="ttname"><a href="namespaceripple_1_1RPC_1_1detail.html#ac52c1b9c7196e379c9a838cde09592bb">ripple::RPC::detail::unknownError</a></div><div class="ttdeci">constexpr ErrorInfo unknownError</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00170">ErrorCodes.cpp:170</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1RPC_1_1detail_html_ae8a277a8a38dcb1d28661036537336b4"><div class="ttname"><a href="namespaceripple_1_1RPC_1_1detail.html#ae8a277a8a38dcb1d28661036537336b4">ripple::RPC::detail::sortErrorInfos</a></div><div class="ttdeci">constexpr auto sortErrorInfos(ErrorInfo const (&unordered)[N]) -> std::array< ErrorInfo, M ></div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00124">ErrorCodes.cpp:124</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1RPC_1_1detail_html_aa702f450a33affe49c682659ea86ad90"><div class="ttname"><a href="namespaceripple_1_1RPC_1_1detail.html#aa702f450a33affe49c682659ea86ad90">ripple::RPC::detail::sortedErrorInfos</a></div><div class="ttdeci">constexpr auto sortedErrorInfos</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00169">ErrorCodes.cpp:169</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1RPC_1_1detail_html_ac52c1b9c7196e379c9a838cde09592bb"><div class="ttname"><a href="namespaceripple_1_1RPC_1_1detail.html#ac52c1b9c7196e379c9a838cde09592bb">ripple::RPC::detail::unknownError</a></div><div class="ttdeci">constexpr ErrorInfo unknownError</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00171">ErrorCodes.cpp:171</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1RPC_1_1detail_html_ae8a277a8a38dcb1d28661036537336b4"><div class="ttname"><a href="namespaceripple_1_1RPC_1_1detail.html#ae8a277a8a38dcb1d28661036537336b4">ripple::RPC::detail::sortErrorInfos</a></div><div class="ttdeci">constexpr auto sortErrorInfos(ErrorInfo const (&unordered)[N]) -> std::array< ErrorInfo, M ></div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00125">ErrorCodes.cpp:125</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1RPC_1_1detail_html_ae8de80620fff9de55ec0ddb5775c26b8"><div class="ttname"><a href="namespaceripple_1_1RPC_1_1detail.html#ae8de80620fff9de55ec0ddb5775c26b8">ripple::RPC::detail::unorderedErrorInfos</a></div><div class="ttdeci">static constexpr ErrorInfo unorderedErrorInfos[]</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00051">ErrorCodes.cpp:51</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1RPC_html_a1a79f0c33d1405fe85c40d63a49658bd"><div class="ttname"><a href="namespaceripple_1_1RPC.html#a1a79f0c33d1405fe85c40d63a49658bd">ripple::RPC::contains_error</a></div><div class="ttdeci">bool contains_error(Json::Value const &json)</div><div class="ttdoc">Returns true if the json contains an rpc error specification.</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00201">ErrorCodes.cpp:201</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1RPC_html_a2cd6200f6709780fcf1dd26ec9cd2866"><div class="ttname"><a href="namespaceripple_1_1RPC.html#a2cd6200f6709780fcf1dd26ec9cd2866">ripple::RPC::make_error</a></div><div class="ttdeci">Json::Value make_error(error_code_i code)</div><div class="ttdoc">Returns a new json object that reflects the error code.</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00185">ErrorCodes.cpp:185</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1RPC_html_a1a79f0c33d1405fe85c40d63a49658bd"><div class="ttname"><a href="namespaceripple_1_1RPC.html#a1a79f0c33d1405fe85c40d63a49658bd">ripple::RPC::contains_error</a></div><div class="ttdeci">bool contains_error(Json::Value const &json)</div><div class="ttdoc">Returns true if the json contains an rpc error specification.</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00202">ErrorCodes.cpp:202</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1RPC_html_a2cd6200f6709780fcf1dd26ec9cd2866"><div class="ttname"><a href="namespaceripple_1_1RPC.html#a2cd6200f6709780fcf1dd26ec9cd2866">ripple::RPC::make_error</a></div><div class="ttdeci">Json::Value make_error(error_code_i code)</div><div class="ttdoc">Returns a new json object that reflects the error code.</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00186">ErrorCodes.cpp:186</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1RPC_html_a577bde9602a28f59e445c496f92a1ccf"><div class="ttname"><a href="namespaceripple_1_1RPC.html#a577bde9602a28f59e445c496f92a1ccf">ripple::RPC::inject_error</a></div><div class="ttdeci">void inject_error(error_code_i code, JsonValue &json)</div><div class="ttdoc">Add or update the json update to reflect the error code.</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8h_source.html#l00223">ErrorCodes.h:223</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1RPC_html_a73e0accbac78ba2dda7a2ba0f3889800"><div class="ttname"><a href="namespaceripple_1_1RPC.html#a73e0accbac78ba2dda7a2ba0f3889800">ripple::RPC::error_code_http_status</a></div><div class="ttdeci">int error_code_http_status(error_code_i code)</div><div class="ttdoc">Returns http status that corresponds to the error code.</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00209">ErrorCodes.cpp:209</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1RPC_html_aa01c09044342d3707e231b3ede5086f0"><div class="ttname"><a href="namespaceripple_1_1RPC.html#aa01c09044342d3707e231b3ede5086f0">ripple::RPC::get_error_info</a></div><div class="ttdeci">ErrorInfo const & get_error_info(error_code_i code)</div><div class="ttdoc">Returns an ErrorInfo that reflects the error code.</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00177">ErrorCodes.cpp:177</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1RPC_html_a73e0accbac78ba2dda7a2ba0f3889800"><div class="ttname"><a href="namespaceripple_1_1RPC.html#a73e0accbac78ba2dda7a2ba0f3889800">ripple::RPC::error_code_http_status</a></div><div class="ttdeci">int error_code_http_status(error_code_i code)</div><div class="ttdoc">Returns http status that corresponds to the error code.</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00210">ErrorCodes.cpp:210</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1RPC_html_aa01c09044342d3707e231b3ede5086f0"><div class="ttname"><a href="namespaceripple_1_1RPC.html#aa01c09044342d3707e231b3ede5086f0">ripple::RPC::get_error_info</a></div><div class="ttdeci">ErrorInfo const & get_error_info(error_code_i code)</div><div class="ttdoc">Returns an ErrorInfo that reflects the error code.</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00178">ErrorCodes.cpp:178</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html"><div class="ttname"><a href="namespaceripple.html">ripple</a></div><div class="ttdoc">Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.</div><div class="ttdef"><b>Definition:</b> <a href="algorithm_8h_source.html#l00026">algorithm.h:26</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a23f02900cac703bddf91fff471cb9d65"><div class="ttname"><a href="namespaceripple.html#a23f02900cac703bddf91fff471cb9d65">ripple::rpcErrorString</a></div><div class="ttdeci">std::string rpcErrorString(Json::Value const &jv)</div><div class="ttdoc">Returns a single string with the contents of an RPC error.</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00217">ErrorCodes.cpp:217</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a23f02900cac703bddf91fff471cb9d65"><div class="ttname"><a href="namespaceripple.html#a23f02900cac703bddf91fff471cb9d65">ripple::rpcErrorString</a></div><div class="ttdeci">std::string rpcErrorString(Json::Value const &jv)</div><div class="ttdoc">Returns a single string with the contents of an RPC error.</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00218">ErrorCodes.cpp:218</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a32d6d3ce1a48272b677d2c88b1d30932"><div class="ttname"><a href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932">ripple::error_code_i</a></div><div class="ttdeci">error_code_i</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8h_source.html#l00040">ErrorCodes.h:40</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a32d6d3ce1a48272b677d2c88b1d30932a02193610b83aaaae66347f6236dcf995"><div class="ttname"><a href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a02193610b83aaaae66347f6236dcf995">ripple::rpcNO_EVENTS</a></div><div class="ttdeci">@ rpcNO_EVENTS</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8h_source.html#l00054">ErrorCodes.h:54</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a32d6d3ce1a48272b677d2c88b1d30932a044301ed3c32624aade5888d1c60566f"><div class="ttname"><a href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a044301ed3c32624aade5888d1c60566f">ripple::rpcACT_NOT_FOUND</a></div><div class="ttdeci">@ rpcACT_NOT_FOUND</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8h_source.html#l00070">ErrorCodes.h:70</a></div></div>
|
||||
@@ -379,6 +380,7 @@ $(function() {
|
||||
<div class="ttc" id="anamespaceripple_html_a32d6d3ce1a48272b677d2c88b1d30932ac1a6dff600f246dd125ce9d6d02eeeba"><div class="ttname"><a href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932ac1a6dff600f246dd125ce9d6d02eeeba">ripple::rpcJSON_RPC</a></div><div class="ttdeci">@ rpcJSON_RPC</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8h_source.html#l00047">ErrorCodes.h:47</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a32d6d3ce1a48272b677d2c88b1d30932ac6b74149815b431c392a0538b5df7b39"><div class="ttname"><a href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932ac6b74149815b431c392a0538b5df7b39">ripple::rpcNOT_ENABLED</a></div><div class="ttdeci">@ rpcNOT_ENABLED</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8h_source.html#l00059">ErrorCodes.h:59</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a32d6d3ce1a48272b677d2c88b1d30932ac88bf3c7097096c5ed0fc4d354e91950"><div class="ttname"><a href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932ac88bf3c7097096c5ed0fc4d354e91950">ripple::rpcDST_ACT_MALFORMED</a></div><div class="ttdeci">@ rpcDST_ACT_MALFORMED</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8h_source.html#l00103">ErrorCodes.h:103</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a32d6d3ce1a48272b677d2c88b1d30932acf2bb4b677f2af23815cbd3727964880"><div class="ttname"><a href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932acf2bb4b677f2af23815cbd3727964880">ripple::rpcWRONG_NETWORK</a></div><div class="ttdeci">@ rpcWRONG_NETWORK</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8h_source.html#l00050">ErrorCodes.h:50</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a32d6d3ce1a48272b677d2c88b1d30932ad23b4971210983fe07f7225143e02225"><div class="ttname"><a href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932ad23b4971210983fe07f7225143e02225">ripple::rpcSRC_CUR_MALFORMED</a></div><div class="ttdeci">@ rpcSRC_CUR_MALFORMED</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8h_source.html#l00124">ErrorCodes.h:124</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a32d6d3ce1a48272b677d2c88b1d30932ad2a733704a1bd3f6f03e451baf23fc53"><div class="ttname"><a href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932ad2a733704a1bd3f6f03e451baf23fc53">ripple::rpcINVALID_HOTWALLET</a></div><div class="ttdeci">@ rpcINVALID_HOTWALLET</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8h_source.html#l00081">ErrorCodes.h:81</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a32d6d3ce1a48272b677d2c88b1d30932ad2f8f023342d32f2602688202894cabe"><div class="ttname"><a href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932ad2f8f023342d32f2602688202894cabe">ripple::rpcBAD_SEED</a></div><div class="ttdeci">@ rpcBAD_SEED</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8h_source.html#l00099">ErrorCodes.h:99</a></div></div>
|
||||
|
||||
Reference in New Issue
Block a user