diff options
author | natrixaeria <janng@gmx.de> | 2019-05-19 17:40:59 +0200 |
---|---|---|
committer | natrixaeria <janng@gmx.de> | 2019-05-19 17:40:59 +0200 |
commit | 1509b5ef3d7e9e71d9294e234ec0e39f2d831998 (patch) | |
tree | 78300ffff230958101b422a4e6026925b287822f /FireBase/FirebaseException.cs | |
parent | c3bb858bb54dc8c64bbd48054c2c58dc0073f09c (diff) | |
parent | c4d046858e0822b7c2c540ac2368b2c0e88e7a26 (diff) |
Merge branch 'scribble' of https://github.com/TrueDoctor/DiscoBot into scribble
Diffstat (limited to 'FireBase/FirebaseException.cs')
-rw-r--r-- | FireBase/FirebaseException.cs | 60 |
1 files changed, 25 insertions, 35 deletions
diff --git a/FireBase/FirebaseException.cs b/FireBase/FirebaseException.cs index e4b782b..cfc09d3 100644 --- a/FireBase/FirebaseException.cs +++ b/FireBase/FirebaseException.cs @@ -1,63 +1,53 @@ -namespace Firebase.Database -{ - using System; - using System.Net; +using System; +using System.Net; +namespace Firebase.Database +{ public class FirebaseException : Exception { public FirebaseException(string requestUrl, string requestData, string responseData, HttpStatusCode statusCode) : base(GenerateExceptionMessage(requestUrl, requestData, responseData)) { - this.RequestUrl = requestUrl; - this.RequestData = requestData; - this.ResponseData = responseData; - this.StatusCode = statusCode; + RequestUrl = requestUrl; + RequestData = requestData; + ResponseData = responseData; + StatusCode = statusCode; } - public FirebaseException(string requestUrl, string requestData, string responseData, HttpStatusCode statusCode, Exception innerException) + public FirebaseException(string requestUrl, string requestData, string responseData, HttpStatusCode statusCode, + Exception innerException) : base(GenerateExceptionMessage(requestUrl, requestData, responseData), innerException) { - this.RequestUrl = requestUrl; - this.RequestData = requestData; - this.ResponseData = responseData; - this.StatusCode = statusCode; + RequestUrl = requestUrl; + RequestData = requestData; + ResponseData = responseData; + StatusCode = statusCode; } /// <summary> - /// Post data passed to the authentication service. + /// Post data passed to the authentication service. /// </summary> - public string RequestData - { - get; - } + public string RequestData { get; } /// <summary> - /// Original url of the request. + /// Original url of the request. /// </summary> - public string RequestUrl - { - get; - } + public string RequestUrl { get; } /// <summary> - /// Response from the authentication service. + /// Response from the authentication service. /// </summary> - public string ResponseData - { - get; - } + public string ResponseData { get; } /// <summary> - /// Status code of the response. + /// Status code of the response. /// </summary> - public HttpStatusCode StatusCode - { - get; - } + public HttpStatusCode StatusCode { get; } private static string GenerateExceptionMessage(string requestUrl, string requestData, string responseData) { - return $"Exception occured while processing the request.\nUrl: {requestUrl}\nRequest Data: {requestData}\nResponse: {responseData}"; + return + $"Exception occured while processing the request.\nUrl: {requestUrl}\nRequest Data: {requestData}\nResponse: {responseData}"; } } -} +}
\ No newline at end of file |