wasDAVClient – Blame information for rev 7

Subversion Repositories:
Rev:
Rev Author Line No. Line
5 office 1 ///////////////////////////////////////////////////////////////////////////
2 // Copyright (C) Wizardry and Steamworks 2016 - License: GNU GPLv3 //
3 // Please see: http://www.gnu.org/licenses/gpl.html for legal details, //
4 // rights of fair usage, the disclaimer and warranty conditions. //
5 ///////////////////////////////////////////////////////////////////////////
7 office 6 // Originally based on: WebDAV .NET client by Sergey Kazantsev
7  
8 using System;
9 using System.Runtime.Serialization;
10 using System.Text;
11 using System.Web;
12  
13 namespace wasDAVClient.Helpers
14 {
15 public class wasDAVException : HttpException
16 {
17 public wasDAVException()
18 {
19 }
20  
21 public wasDAVException(string message)
22 : base(message)
23 {
24 }
25  
26 public wasDAVException(string message, int hr)
27 : base(message, hr)
28 {
29 }
30  
31 public wasDAVException(string message, Exception innerException)
32 : base(message, innerException)
33 {
34 }
35  
36 public wasDAVException(int httpCode, string message, Exception innerException)
37 : base(httpCode, message, innerException)
38 {
39 }
40  
41 public wasDAVException(int httpCode, string message)
42 : base(httpCode, message)
43 {
44 }
45  
46 public wasDAVException(int httpCode, string message, int hr)
47 : base(httpCode, message, hr)
48 {
49 }
50  
51 protected wasDAVException(SerializationInfo info, StreamingContext context)
52 : base(info, context)
53 {
54 }
55  
56 public override string ToString()
57 {
58 var sb = new StringBuilder();
59 sb.Append($"HttpStatusCode: {GetHttpCode()}");
60 sb.Append(Environment.NewLine);
61 sb.Append($"ErrorCode: {ErrorCode}");
62 sb.Append(Environment.NewLine);
63 sb.Append($"Message: {Message}");
64 sb.Append(Environment.NewLine);
65 sb.Append(base.ToString());
66  
67 return sb.ToString();
68 }
69 }
1 office 70 }