Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: third_party/grpc/src/csharp/Grpc.Core/StatusCode.cs

Issue 1932353002: Initial checkin of gRPC to third_party/ Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 #region Copyright notice and license
2
3 // Copyright 2015, Google Inc.
4 // All rights reserved.
5 //
6 // Redistribution and use in source and binary forms, with or without
7 // modification, are permitted provided that the following conditions are
8 // met:
9 //
10 // * Redistributions of source code must retain the above copyright
11 // notice, this list of conditions and the following disclaimer.
12 // * Redistributions in binary form must reproduce the above
13 // copyright notice, this list of conditions and the following disclaimer
14 // in the documentation and/or other materials provided with the
15 // distribution.
16 // * Neither the name of Google Inc. nor the names of its
17 // contributors may be used to endorse or promote products derived from
18 // this software without specific prior written permission.
19 //
20 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
32 #endregion
33
34 namespace Grpc.Core
35 {
36 /// <summary>
37 /// Result of a remote procedure call.
38 /// Based on grpc_status_code from grpc/status.h
39 /// </summary>
40 public enum StatusCode
41 {
42 /// <summary>Not an error; returned on success.</summary>
43 OK = 0,
44
45 /// <summary>The operation was cancelled (typically by the caller).</sum mary>
46 Cancelled = 1,
47
48 /// <summary>
49 /// Unknown error. An example of where this error may be returned is
50 /// if a Status value received from another address space belongs to
51 /// an error-space that is not known in this address space. Also
52 /// errors raised by APIs that do not return enough error information
53 /// may be converted to this error.
54 /// </summary>
55 Unknown = 2,
56
57 /// <summary>
58 /// Client specified an invalid argument. Note that this differs
59 /// from FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments
60 /// that are problematic regardless of the state of the system
61 /// (e.g., a malformed file name).
62 /// </summary>
63 InvalidArgument = 3,
64
65 /// <summary>
66 /// Deadline expired before operation could complete. For operations
67 /// that change the state of the system, this error may be returned
68 /// even if the operation has completed successfully. For example, a
69 /// successful response from a server could have been delayed long
70 /// enough for the deadline to expire.
71 /// </summary>
72 DeadlineExceeded = 4,
73
74 /// <summary>Some requested entity (e.g., file or directory) was not fou nd.</summary>
75 NotFound = 5,
76
77 /// <summary>Some entity that we attempted to create (e.g., file or dire ctory) already exists.</summary>
78 AlreadyExists = 6,
79
80 /// <summary>
81 /// The caller does not have permission to execute the specified
82 /// operation. PERMISSION_DENIED must not be used for rejections
83 /// caused by exhausting some resource (use RESOURCE_EXHAUSTED
84 /// instead for those errors). PERMISSION_DENIED must not be
85 /// used if the caller can not be identified (use UNAUTHENTICATED
86 /// instead for those errors).
87 /// </summary>
88 PermissionDenied = 7,
89
90 /// <summary>The request does not have valid authentication credentials for the operation.</summary>
91 Unauthenticated = 16,
92
93 /// <summary>
94 /// Some resource has been exhausted, perhaps a per-user quota, or
95 /// perhaps the entire file system is out of space.
96 /// </summary>
97 ResourceExhausted = 8,
98
99 /// <summary>
100 /// Operation was rejected because the system is not in a state
101 /// required for the operation's execution. For example, directory
102 /// to be deleted may be non-empty, an rmdir operation is applied to
103 /// a non-directory, etc.
104 /// </summary>
105 FailedPrecondition = 9,
106
107 /// <summary>
108 /// The operation was aborted, typically due to a concurrency issue
109 /// like sequencer check failures, transaction aborts, etc.
110 /// </summary>
111 Aborted = 10,
112
113 /// <summary>
114 /// Operation was attempted past the valid range. E.g., seeking or
115 /// reading past end of file.
116 /// </summary>
117 OutOfRange = 11,
118
119 /// <summary>Operation is not implemented or not supported/enabled in th is service.</summary>
120 Unimplemented = 12,
121
122 /// <summary>
123 /// Internal errors. Means some invariants expected by underlying
124 /// system has been broken. If you see one of these errors,
125 /// something is very broken.
126 /// </summary>
127 Internal = 13,
128
129 /// <summary>
130 /// The service is currently unavailable. This is a most likely a
131 /// transient condition and may be corrected by retrying with
132 /// a backoff.
133 /// </summary>
134 Unavailable = 14,
135
136 /// <summary>Unrecoverable data loss or corruption.</summary>
137 DataLoss = 15
138 }
139 }
OLDNEW
« no previous file with comments | « third_party/grpc/src/csharp/Grpc.Core/Status.cs ('k') | third_party/grpc/src/csharp/Grpc.Core/Utils/AsyncStreamExtensions.cs » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698