tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
ClientException.cs
Go to the documentation of this file.
1using System;
2using System.Net;
3using System.Net.Http;
4
6{
10 public abstract class ClientException : Exception
11 {
15 public HttpResponseMessage? ResponseMessage { get; }
16
22 protected ClientException(HttpResponseMessage responseMessage, string message)
23 : base(message)
24 {
25 ResponseMessage = responseMessage ?? throw new ArgumentNullException(nameof(responseMessage));
26 }
27
31 protected ClientException()
32 {
33 }
34
39 protected ClientException(string message)
40 : base(message)
41 {
42 }
43
49 protected ClientException(string message, Exception innerException)
50 : base(message, innerException)
51 {
52 }
53 }
54}
Exceptions thrown by IRestServerClients.
ClientException(HttpResponseMessage responseMessage, string message)
Initializes a new instance of the ClientException class.
ClientException(string message, Exception innerException)
Initializes a new instance of the ClientException class.
ClientException(string message)
Initializes a new instance of the ClientException class.
ClientException()
Initializes a new instance of the ClientException class.
HttpResponseMessage? ResponseMessage
The HttpStatusCode of the ClientException.