wasDAVClient – Blame information for rev 5
?pathlinks?
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 | /////////////////////////////////////////////////////////////////////////// |
||
6 | // Originally based on: WebDAV .NET client by Sergey Kazantsev |
||
7 | |||
1 | office | 8 | using System; |
9 | using System.Runtime.Serialization; |
||
5 | office | 10 | using System.Text; |
1 | office | 11 | using System.Web; |
12 | |||
13 | namespace wasDAVClient.Helpers |
||
14 | { |
||
15 | public class wasDAVException : HttpException |
||
16 | { |
||
17 | public wasDAVException() |
||
18 | { |
||
19 | } |
||
20 | |||
3 | office | 21 | public wasDAVException(string message) |
1 | office | 22 | : base(message) |
3 | office | 23 | { |
24 | } |
||
1 | office | 25 | |
3 | office | 26 | public wasDAVException(string message, int hr) |
1 | office | 27 | : base(message, hr) |
3 | office | 28 | { |
29 | } |
||
1 | office | 30 | |
3 | office | 31 | public wasDAVException(string message, Exception innerException) |
1 | office | 32 | : base(message, innerException) |
3 | office | 33 | { |
34 | } |
||
1 | office | 35 | |
3 | office | 36 | public wasDAVException(int httpCode, string message, Exception innerException) |
1 | office | 37 | : base(httpCode, message, innerException) |
3 | office | 38 | { |
39 | } |
||
1 | office | 40 | |
3 | office | 41 | public wasDAVException(int httpCode, string message) |
1 | office | 42 | : base(httpCode, message) |
3 | office | 43 | { |
44 | } |
||
1 | office | 45 | |
3 | office | 46 | public wasDAVException(int httpCode, string message, int hr) |
1 | office | 47 | : base(httpCode, message, hr) |
3 | office | 48 | { |
49 | } |
||
1 | office | 50 | |
3 | office | 51 | protected wasDAVException(SerializationInfo info, StreamingContext context) |
1 | office | 52 | : base(info, context) |
3 | office | 53 | { |
54 | } |
||
1 | office | 55 | |
56 | public override string ToString() |
||
57 | { |
||
5 | office | 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()); |
||
1 | office | 66 | |
5 | office | 67 | return sb.ToString(); |
1 | office | 68 | } |
69 | } |
||
70 | } |