Grpc.Core.RpcException.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415
  1. <!DOCTYPE html>
  2. <!--[if IE]><![endif]-->
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <title>Class RpcException
  8. | gRPC C# </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class RpcException
  11. | gRPC C# ">
  12. <meta name="generator" content="docfx 2.36.0.0">
  13. <link rel="shortcut icon" href="../favicon.ico">
  14. <link rel="stylesheet" href="../styles/docfx.vendor.css">
  15. <link rel="stylesheet" href="../styles/docfx.css">
  16. <link rel="stylesheet" href="../styles/main.css">
  17. <meta property="docfx:navrel" content="../toc.html">
  18. <meta property="docfx:tocrel" content="toc.html">
  19. <meta property="docfx:rel" content="../">
  20. </head>
  21. <body data-spy="scroll" data-target="#affix" data-offset="120">
  22. <div id="wrapper">
  23. <header>
  24. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  25. <div class="container">
  26. <div class="navbar-header">
  27. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  28. <span class="sr-only">Toggle navigation</span>
  29. <span class="icon-bar"></span>
  30. <span class="icon-bar"></span>
  31. <span class="icon-bar"></span>
  32. </button>
  33. <a class="navbar-brand" href="../index.html">
  34. <img id="logo" class="svg" src="../logo.svg" alt="">
  35. </a>
  36. </div>
  37. <div class="collapse navbar-collapse" id="navbar">
  38. <form class="navbar-form navbar-right" role="search" id="search">
  39. <div class="form-group">
  40. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  41. </div>
  42. </form>
  43. </div>
  44. </div>
  45. </nav>
  46. <div class="subnav navbar navbar-default">
  47. <div class="container hide-when-search" id="breadcrumb">
  48. <ul class="breadcrumb">
  49. <li></li>
  50. </ul>
  51. </div>
  52. </div>
  53. </header>
  54. <div class="container body-content">
  55. <div id="search-results">
  56. <div class="search-list"></div>
  57. <div class="sr-items">
  58. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  59. </div>
  60. <ul id="pagination"></ul>
  61. </div>
  62. </div>
  63. <div role="main" class="container body-content hide-when-search">
  64. <div class="sidenav hide-when-search">
  65. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  66. <div class="sidetoggle collapse" id="sidetoggle">
  67. <div id="sidetoc"></div>
  68. </div>
  69. </div>
  70. <div class="article row grid-right">
  71. <div class="col-md-10">
  72. <article class="content wrap" id="_content" data-uid="Grpc.Core.RpcException">
  73. <h1 id="Grpc_Core_RpcException" data-uid="Grpc.Core.RpcException" class="text-break">Class RpcException
  74. </h1>
  75. <div class="markdown level0 summary"><p>Thrown when remote procedure call fails. Every <code>RpcException</code> is associated with a resulting <a class="xref" href="Grpc.Core.RpcException.html#Grpc_Core_RpcException_Status">Status</a> of the call.</p>
  76. </div>
  77. <div class="markdown level0 conceptual"></div>
  78. <div class="inheritance">
  79. <h5>Inheritance</h5>
  80. <div class="level0"><span class="xref">System.Object</span></div>
  81. <div class="level1"><span class="xref">System.Exception</span></div>
  82. <div class="level2"><span class="xref">RpcException</span></div>
  83. </div>
  84. <div classs="implements">
  85. <h5>Implements</h5>
  86. <div><span class="xref">System.Runtime.InteropServices._Exception</span></div>
  87. <div><span class="xref">System.Runtime.Serialization.ISerializable</span></div>
  88. </div>
  89. <div class="inheritedMembers">
  90. <h5>Inherited Members</h5>
  91. <div>
  92. <span class="xref">System.Exception.GetBaseException()</span>
  93. </div>
  94. <div>
  95. <span class="xref">System.Exception.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)</span>
  96. </div>
  97. <div>
  98. <span class="xref">System.Exception.GetType()</span>
  99. </div>
  100. <div>
  101. <span class="xref">System.Exception.ToString()</span>
  102. </div>
  103. <div>
  104. <span class="xref">System.Exception.Data</span>
  105. </div>
  106. <div>
  107. <span class="xref">System.Exception.HelpLink</span>
  108. </div>
  109. <div>
  110. <span class="xref">System.Exception.HResult</span>
  111. </div>
  112. <div>
  113. <span class="xref">System.Exception.InnerException</span>
  114. </div>
  115. <div>
  116. <span class="xref">System.Exception.Message</span>
  117. </div>
  118. <div>
  119. <span class="xref">System.Exception.Source</span>
  120. </div>
  121. <div>
  122. <span class="xref">System.Exception.StackTrace</span>
  123. </div>
  124. <div>
  125. <span class="xref">System.Exception.TargetSite</span>
  126. </div>
  127. <div>
  128. <span class="xref">System.Exception.SerializeObjectState</span>
  129. </div>
  130. <div>
  131. <span class="xref">System.Object.Equals(System.Object)</span>
  132. </div>
  133. <div>
  134. <span class="xref">System.Object.Equals(System.Object, System.Object)</span>
  135. </div>
  136. <div>
  137. <span class="xref">System.Object.GetHashCode()</span>
  138. </div>
  139. <div>
  140. <span class="xref">System.Object.MemberwiseClone()</span>
  141. </div>
  142. <div>
  143. <span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
  144. </div>
  145. </div>
  146. <h6><strong>Namespace</strong>: <a class="xref" href="Grpc.Core.html">Grpc.Core</a></h6>
  147. <h6><strong>Assembly</strong>: Grpc.Core.Api.dll</h6>
  148. <h5 id="Grpc_Core_RpcException_syntax">Syntax</h5>
  149. <div class="codewrapper">
  150. <pre><code class="lang-csharp hljs">public class RpcException : Exception, _Exception, ISerializable</code></pre>
  151. </div>
  152. <h3 id="constructors">Constructors
  153. </h3>
  154. <a id="Grpc_Core_RpcException__ctor_" data-uid="Grpc.Core.RpcException.#ctor*"></a>
  155. <h4 id="Grpc_Core_RpcException__ctor_Grpc_Core_Status_" data-uid="Grpc.Core.RpcException.#ctor(Grpc.Core.Status)">RpcException(Status)</h4>
  156. <div class="markdown level1 summary"><p>Creates a new <code>RpcException</code> associated with given status.</p>
  157. </div>
  158. <div class="markdown level1 conceptual"></div>
  159. <h5 class="decalaration">Declaration</h5>
  160. <div class="codewrapper">
  161. <pre><code class="lang-csharp hljs">public RpcException(Status status)</code></pre>
  162. </div>
  163. <h5 class="parameters">Parameters</h5>
  164. <table class="table table-bordered table-striped table-condensed">
  165. <thead>
  166. <tr>
  167. <th>Type</th>
  168. <th>Name</th>
  169. <th>Description</th>
  170. </tr>
  171. </thead>
  172. <tbody>
  173. <tr>
  174. <td><a class="xref" href="Grpc.Core.Status.html">Status</a></td>
  175. <td><span class="parametername">status</span></td>
  176. <td><p>Resulting status of a call.</p>
  177. </td>
  178. </tr>
  179. </tbody>
  180. </table>
  181. <a id="Grpc_Core_RpcException__ctor_" data-uid="Grpc.Core.RpcException.#ctor*"></a>
  182. <h4 id="Grpc_Core_RpcException__ctor_Grpc_Core_Status_Grpc_Core_Metadata_" data-uid="Grpc.Core.RpcException.#ctor(Grpc.Core.Status,Grpc.Core.Metadata)">RpcException(Status, Metadata)</h4>
  183. <div class="markdown level1 summary"><p>Creates a new <code>RpcException</code> associated with given status and trailing response metadata.</p>
  184. </div>
  185. <div class="markdown level1 conceptual"></div>
  186. <h5 class="decalaration">Declaration</h5>
  187. <div class="codewrapper">
  188. <pre><code class="lang-csharp hljs">public RpcException(Status status, Metadata trailers)</code></pre>
  189. </div>
  190. <h5 class="parameters">Parameters</h5>
  191. <table class="table table-bordered table-striped table-condensed">
  192. <thead>
  193. <tr>
  194. <th>Type</th>
  195. <th>Name</th>
  196. <th>Description</th>
  197. </tr>
  198. </thead>
  199. <tbody>
  200. <tr>
  201. <td><a class="xref" href="Grpc.Core.Status.html">Status</a></td>
  202. <td><span class="parametername">status</span></td>
  203. <td><p>Resulting status of a call.</p>
  204. </td>
  205. </tr>
  206. <tr>
  207. <td><a class="xref" href="Grpc.Core.Metadata.html">Metadata</a></td>
  208. <td><span class="parametername">trailers</span></td>
  209. <td><p>Response trailing metadata.</p>
  210. </td>
  211. </tr>
  212. </tbody>
  213. </table>
  214. <a id="Grpc_Core_RpcException__ctor_" data-uid="Grpc.Core.RpcException.#ctor*"></a>
  215. <h4 id="Grpc_Core_RpcException__ctor_Grpc_Core_Status_Grpc_Core_Metadata_System_String_" data-uid="Grpc.Core.RpcException.#ctor(Grpc.Core.Status,Grpc.Core.Metadata,System.String)">RpcException(Status, Metadata, String)</h4>
  216. <div class="markdown level1 summary"><p>Creates a new <code>RpcException</code> associated with given status, message and trailing response metadata.
  217. NOTE: the exception message is not sent to the remote peer. Use <code>status.Details</code> to pass error
  218. details to the peer.</p>
  219. </div>
  220. <div class="markdown level1 conceptual"></div>
  221. <h5 class="decalaration">Declaration</h5>
  222. <div class="codewrapper">
  223. <pre><code class="lang-csharp hljs">public RpcException(Status status, Metadata trailers, string message)</code></pre>
  224. </div>
  225. <h5 class="parameters">Parameters</h5>
  226. <table class="table table-bordered table-striped table-condensed">
  227. <thead>
  228. <tr>
  229. <th>Type</th>
  230. <th>Name</th>
  231. <th>Description</th>
  232. </tr>
  233. </thead>
  234. <tbody>
  235. <tr>
  236. <td><a class="xref" href="Grpc.Core.Status.html">Status</a></td>
  237. <td><span class="parametername">status</span></td>
  238. <td><p>Resulting status of a call.</p>
  239. </td>
  240. </tr>
  241. <tr>
  242. <td><a class="xref" href="Grpc.Core.Metadata.html">Metadata</a></td>
  243. <td><span class="parametername">trailers</span></td>
  244. <td><p>Response trailing metadata.</p>
  245. </td>
  246. </tr>
  247. <tr>
  248. <td><span class="xref">System.String</span></td>
  249. <td><span class="parametername">message</span></td>
  250. <td><p>The exception message.</p>
  251. </td>
  252. </tr>
  253. </tbody>
  254. </table>
  255. <a id="Grpc_Core_RpcException__ctor_" data-uid="Grpc.Core.RpcException.#ctor*"></a>
  256. <h4 id="Grpc_Core_RpcException__ctor_Grpc_Core_Status_System_String_" data-uid="Grpc.Core.RpcException.#ctor(Grpc.Core.Status,System.String)">RpcException(Status, String)</h4>
  257. <div class="markdown level1 summary"><p>Creates a new <code>RpcException</code> associated with given status and message.
  258. NOTE: the exception message is not sent to the remote peer. Use <code>status.Details</code> to pass error
  259. details to the peer.</p>
  260. </div>
  261. <div class="markdown level1 conceptual"></div>
  262. <h5 class="decalaration">Declaration</h5>
  263. <div class="codewrapper">
  264. <pre><code class="lang-csharp hljs">public RpcException(Status status, string message)</code></pre>
  265. </div>
  266. <h5 class="parameters">Parameters</h5>
  267. <table class="table table-bordered table-striped table-condensed">
  268. <thead>
  269. <tr>
  270. <th>Type</th>
  271. <th>Name</th>
  272. <th>Description</th>
  273. </tr>
  274. </thead>
  275. <tbody>
  276. <tr>
  277. <td><a class="xref" href="Grpc.Core.Status.html">Status</a></td>
  278. <td><span class="parametername">status</span></td>
  279. <td><p>Resulting status of a call.</p>
  280. </td>
  281. </tr>
  282. <tr>
  283. <td><span class="xref">System.String</span></td>
  284. <td><span class="parametername">message</span></td>
  285. <td><p>The exception message.</p>
  286. </td>
  287. </tr>
  288. </tbody>
  289. </table>
  290. <h3 id="properties">Properties
  291. </h3>
  292. <a id="Grpc_Core_RpcException_Status_" data-uid="Grpc.Core.RpcException.Status*"></a>
  293. <h4 id="Grpc_Core_RpcException_Status" data-uid="Grpc.Core.RpcException.Status">Status</h4>
  294. <div class="markdown level1 summary"><p>Resulting status of the call.</p>
  295. </div>
  296. <div class="markdown level1 conceptual"></div>
  297. <h5 class="decalaration">Declaration</h5>
  298. <div class="codewrapper">
  299. <pre><code class="lang-csharp hljs">public Status Status { get; }</code></pre>
  300. </div>
  301. <h5 class="propertyValue">Property Value</h5>
  302. <table class="table table-bordered table-striped table-condensed">
  303. <thead>
  304. <tr>
  305. <th>Type</th>
  306. <th>Description</th>
  307. </tr>
  308. </thead>
  309. <tbody>
  310. <tr>
  311. <td><a class="xref" href="Grpc.Core.Status.html">Status</a></td>
  312. <td></td>
  313. </tr>
  314. </tbody>
  315. </table>
  316. <a id="Grpc_Core_RpcException_StatusCode_" data-uid="Grpc.Core.RpcException.StatusCode*"></a>
  317. <h4 id="Grpc_Core_RpcException_StatusCode" data-uid="Grpc.Core.RpcException.StatusCode">StatusCode</h4>
  318. <div class="markdown level1 summary"><p>Returns the status code of the call, as a convenient alternative to <a class="xref" href="Grpc.Core.RpcException.html#Grpc_Core_RpcException_StatusCode">StatusCode</a>.</p>
  319. </div>
  320. <div class="markdown level1 conceptual"></div>
  321. <h5 class="decalaration">Declaration</h5>
  322. <div class="codewrapper">
  323. <pre><code class="lang-csharp hljs">public StatusCode StatusCode { get; }</code></pre>
  324. </div>
  325. <h5 class="propertyValue">Property Value</h5>
  326. <table class="table table-bordered table-striped table-condensed">
  327. <thead>
  328. <tr>
  329. <th>Type</th>
  330. <th>Description</th>
  331. </tr>
  332. </thead>
  333. <tbody>
  334. <tr>
  335. <td><a class="xref" href="Grpc.Core.StatusCode.html">StatusCode</a></td>
  336. <td></td>
  337. </tr>
  338. </tbody>
  339. </table>
  340. <a id="Grpc_Core_RpcException_Trailers_" data-uid="Grpc.Core.RpcException.Trailers*"></a>
  341. <h4 id="Grpc_Core_RpcException_Trailers" data-uid="Grpc.Core.RpcException.Trailers">Trailers</h4>
  342. <div class="markdown level1 summary"><p>Gets the call trailing metadata.
  343. Trailers only have meaningful content for client-side calls (in which case they represent the trailing metadata sent by the server when closing the call).
  344. Instances of <code>RpcException</code> thrown by the server-side part of the stack will have trailers always set to empty.</p>
  345. </div>
  346. <div class="markdown level1 conceptual"></div>
  347. <h5 class="decalaration">Declaration</h5>
  348. <div class="codewrapper">
  349. <pre><code class="lang-csharp hljs">public Metadata Trailers { get; }</code></pre>
  350. </div>
  351. <h5 class="propertyValue">Property Value</h5>
  352. <table class="table table-bordered table-striped table-condensed">
  353. <thead>
  354. <tr>
  355. <th>Type</th>
  356. <th>Description</th>
  357. </tr>
  358. </thead>
  359. <tbody>
  360. <tr>
  361. <td><a class="xref" href="Grpc.Core.Metadata.html">Metadata</a></td>
  362. <td></td>
  363. </tr>
  364. </tbody>
  365. </table>
  366. <h3 id="implements">Implements</h3>
  367. <div>
  368. <span class="xref">System.Runtime.InteropServices._Exception</span>
  369. </div>
  370. <div>
  371. <span class="xref">System.Runtime.Serialization.ISerializable</span>
  372. </div>
  373. </article>
  374. </div>
  375. <div class="hidden-sm col-md-2" role="complementary">
  376. <div class="sideaffix">
  377. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  378. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  379. </nav>
  380. </div>
  381. </div>
  382. </div>
  383. </div>
  384. <footer>
  385. <div class="grad-bottom"></div>
  386. <div class="footer">
  387. <div class="container">
  388. <span class="pull-right">
  389. <a href="#top">Back to top</a>
  390. </span>
  391. <span>Generated by <strong>DocFX</strong></span>
  392. </div>
  393. </div>
  394. </footer>
  395. </div>
  396. <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
  397. <script type="text/javascript" src="../styles/docfx.js"></script>
  398. <script type="text/javascript" src="../styles/main.js"></script>
  399. </body>
  400. </html>